Guido van Rossum wrote: > On 6/10/07, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Guido van Rossum schrieb: >>> Very cool; thanks!!! No problems so far. >>> >>> I wonder if we need a bin() built-in that is to 0b like oct() is to 0o >>> and hex() to 0x? >> Would that also require a __bin__() special method? > > If the other two use it, we might as well model it that way. >
I must admit I've never understood why hex() and oct() don't just go through __int__() (Note that the integer formats are all defined as going through int() in PEP 3101). If we only want them to work for true integers, then we have __index__() available now. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com