johansen <johan...@sun.com> added the comment: I haven't been able to find any of the patches listed in the comments, but it does look like providing a nb_nonzero method in the module would solve our issue. PyObject_IsTrue checks the tp_as_number methods before the sequence and mapping methods. I'm not sure if it's safe to count on this behavior as always being true, but for 2.4 and the dbmmodule, it would work.
_______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2159> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com