confused by isinstance()

Jason Orendorff jason at jorendorff.com
Fri Feb 1 07:31:38 CET 2002


Francois:

Try reading and running this little program
and see if it clears anything up for you.

# === foo.py
class X:
    pass

if __name__ == '__main__':
    import foo
    import __main__

    print foo is __main__
    print foo.X is __main__.X

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list