On 3/18/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
> I just want to add that I've adapted and extended Thomas' original patch
> for the 0o123 syntax. It should be pretty complete.
>
> Open issues would probably be:
> - should int("0755", 0) give 0o755? (IMO yes)The PEP covers this, with the answer current of "yes" for 2.6 and "exception" for 3.0. (It presumes int(x, 0) should be the same as the compiler tokenizer result.) > - what should "%#o" % 100 result in? "0144" or "0o144"? > - should oct(100) return "0144" or "0o144"? Thanks! I missed that the formatter had the '#' option, and completely forgot about the oct() function. I think TOOWTDI says 0o144 in both cases. OTOH, does anybody actually use the oct() function? Has the issue of hex() and oct() remaining builtin been covered? Should we add a matching bin() or remove oct()? Also, PEP 3101 does not currently contain the '#' "alternate form' specifier. Is this an oversight which needs to be corrected? Thanks, Pat _______________________________________________ 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
