Re: [Tutor] isinstance -> instance

2007-02-26 Thread Alan Gauld
"Bernard Lebel" <[EMAIL PROTECTED]> wrote > class A: >def __init__( self ): >self.a = 'a' > > a = A() > > print type( a ) > > Outputs: > So use types.Instancetype import types as t >>> class A: pass ... >>> a = A() >>> type(a) >>> type(A) >>> type(a) == t.InstanceType True >>>

[Tutor] isinstance -> instance

2007-02-26 Thread Bernard Lebel
Hello, Following the guidelines here, at the bottom of the page: http://www.python.org/dev/peps/pep-0008/ I'm using isinstance() to test the type of some data. Now the thing is that, what is the name to use for a class instance? For example, say I run this: class A: def __init__( self ):