confused by bindings
Sam Falkner
samf+usenet at frii.com
Fri Sep 21 15:24:43 EDT 2001
Brief recap: I've been trying to write a test for my code, and by best
efforts have been failing in bizarre ways. I tried four different
ways to write the tests, detailed in the message that this is
following-up.
Alex's follow-up pointed out the flaw in my use of the Borg class.
But, I was much more confused about why the other methods were
failing.
The bottom line: I was doing a bad thing in one of my C extensions.
I started getting other very odd behavior in my app, such as
isinstance(c, data.Cell)
returning false, but c.__class__ is data.Cell, and c is obviously
behaving as a Cell. When this happened, I went over my C code line by
line. In one place, I was importing "mod" (name changed to protect
the guilty), and I meant to be importing "pkg.mod". Because I was
sitting in the same directory as "mod", it didn't fail. I fixed this,
and these problems have vanished.
* * *
Thanks for all the replies, this has been a good learning experience
for me. Whew!
- Sam
More information about the Python-list
mailing list