[issue15559] Bad interaction between ipaddress addresses and the bytes constructor

2012-12-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I changed the precedence now, so __bytes__ is tried before __index__. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15559 ___

[issue15559] Bad interaction between ipaddress addresses and the bytes constructor

2012-08-05 Thread Nick Coghlan
New submission from Nick Coghlan: I've been tinkering with the ipaddress module as I review Eli's documentation and have uncovered a *very* nasty interaction between ipaddress objects and the bytes constructor. Specifically, if you pass an integer to bytes() it will attempt to allocate and

[issue15559] Bad interaction between ipaddress addresses and the bytes constructor

2012-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5abea8a43f19 by Nick Coghlan in branch 'default': Close #15559: Implementing __index__ creates a nasty interaction with the bytes constructor. At least for 3.3, ipaddress objects must now be explicitly converted with int() and thus can't be passed