On 8/8/07, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Victor Stinner just made a good point at #python. The py3k has no magic
> method and type slot for bytes. Python has magic methods like __int__
> for int(ob) and __str__ for str(ob). Are you considering to add a
> __bytes__ method and tp_bytes?

Never occurred to me. The intention is that bytes() has a fixed
signature. It's far less important than str(). __int__() is different,
numeric types must be convertible.

> I can think of a bunch of use cases for a magic method.

Such as?

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to