[issue4345] Implement nb_nonzero for PyTclObject
Mark Dickinson
report at bugs.python.org
Wed Aug 4 22:21:23 CEST 2010
Mark Dickinson <dickinsm at gmail.com> added the comment:
> If you want to expand it to handle other data types, I'm ok with it
> but I predict troubles for you.
Yes, I suspected as much. I don't know much Tcl, but I'm definitely prepared to believe you on this point. :) I'd be fine with this patch if there's some documentation somewhere that points out that the bool() might give unexpected results (for Python users) for zeros, empty lists, etc.
I assume that Tcl_GetCharLength works for any object, regardless of its internal representation?
Can you update the patch for py3k, and add docs and tests?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4345>
_______________________________________
More information about the Python-bugs-list
mailing list