[issue12974] array module: deprecate '__int__' conversion support for array elements

Stefan Krah report at bugs.python.org
Fri Sep 16 18:56:05 CEST 2011


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Meador Inge <report at 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 <report at bugs.python.org>
<http://bugs.python.org/issue12974>
_______________________________________


More information about the Python-bugs-list mailing list