On Sun,  5 Aug 2012 10:20:36 +0200 (CEST)
nick.coghlan <python-check...@python.org> wrote:

> http://hg.python.org/cpython/rev/5abea8a43f19
> changeset:   78426:5abea8a43f19
> user:        Nick Coghlan <ncogh...@gmail.com>
> date:        Sun Aug 05 18:20:17 2012 +1000
> summary:
>   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 directly to the hex() builtin.

__index__, as the name implies, allows instances to be used as sequence
indices, which does sound like a weird thing to serve as for an IP
address :-)

Regards

Antoine.


-- 
Software development and contracting: http://pro.pitrou.net


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to