Stefan Krah <stefan-use...@bytereef.org> added the comment:

Meador Inge <rep...@bugs.python.org> wrote:
> The behavior around '__int__' in previous versions seems somewhat accidental.

I think struct followed the functions in longobject.c, which is not
really consistent with respect to duck typing. See also #12965 or
http://bugs.python.org/issue1172711#msg48086.

But I think that the decision to accept __index__() for both signed
and unsigned integer formats is good for consistency.

For 'P' I'm not sure, but course it might be used in the wild by now.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12974>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to