"print 0.1==0.1" -> TypeError; what did I do?

Maciej Kalisiak mac at dgp.toronto.edu
Tue Dec 4 11:19:30 EST 2001

"Fredrik Lundh" <fredrik at pythonware.com> writes:

> does the problem go away if you add this line just
> after the call to your extension:
>     hasattr(None, "spam")

Yes!  After following your suggestions about PyErr_Occurred() I
quickly found the problem, thanks!  I'm curious though, how exactly
did the above statement get rid of the exception??

Maciej Kalisiak|mac@] "Be master of your petty annoyances and conserve your
dgp.toronto.edu|www.]  energies for the big, worthwhile things. It isn't the
dgp.toronto.edu/~mac]  mountain ahead that wears you out - it's the grain of
                    ]  sand in your shoe." -- Robert Service

More information about the Python-list mailing list