Note that your request is different from your example, neither of which have
anything to do with type(). In your request, you ask for a mechanism for
obtaining the class of an object. In your example, you use a predicate that
compares an instance with a class for class membership. Types have nothing
to do with class heirarchy.
Following your example (but satisfying your request), try:
if f.__class__ == Fake:
...
or even
if f.__class__.__name__ == Fake.__name__:
...
You can imagine how trivial it would be to compose the function
isInstanceOfClass(class_instance, class), as your example conjectures.
This is marginally documented in both the Reference Manual and the
Library Reference -- RTFM.
On the other hand, if you're really interested in types, refer to the
typep.py module i distributed to the net yesterday. Incidentally, i
added a typeof function to return the name of the type of the object
argument (loosely analogous to Common Lisp). E-mail me directly if you
want an updated release.
jpl