Jython class names
Erik Max Francis
max at alcyone.com
Tue Sep 9 15:15:48 EDT 2003
Robin Becker wrote:
> I just tried [in Jython] and wow
>
> >>>> class C: pass
> >...
> >>>> C().__class__.__name__ is C.__name__
> >True
>
> it doesn't work
The obvious question might be why you're expecting it to work. Why are
you testing string equality with the is operator? Test it with the
equality operator, ==.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Silence is the most perfect expression of scorn.
\__/ George Bernard Shaw
More information about the Python-list
mailing list