<br>When you're done with the PEP, here's the code: <a href="http://python.org/sf/1681002">http://python.org/sf/1681002</a><br> <br><div><span class="gmail_quote">On 3/14/07, <b class="gmail_sendername">Patrick Maupin
</b> <<a href="mailto:pmaupin@gmail.com">pmaupin@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sure. I'll do that tonight or tomorrow.
<br><br>It would be great to get my feet wet on the process on a relatively<br>simple PEP. One other question, first though -- not that I want to<br>open a huge can of worms or anything, but if we are trying to make<br>things nice and consistent, how about:
<br><br> x = int("0x500")<br><br>I know I can do int("500", 16) (and I think we want to keep that for<br>sure), but for the cases of binary, octal, and hexadecimal which we<br>have decided are special and useful, should the standard integer
<br>constructor also take these strings?<br><br>Thanks,<br>Pat<br><br><br>On 3/14/07, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>> Great! Mind writing up writing up a PEP that summarizes the discussion
<br>> (a bit)? In particular it should explain (a) why we need octal<br>> literals; (b) why leading-zero is bad; (c) why we don't need general<br>> bases; (d) why 0t is the best choice. Oh, and please add 0b too;
<br>> there's no formal proposal for that yet. Thanks!<br>><br>> --Guido<br>><br>> On 3/14/07, Patrick Maupin <<a href="mailto:pmaupin@gmail.com">pmaupin@gmail.com</a>> wrote:<br>> > On 3/14/07, Oleg Broytmann <
<a href="mailto:phd@phd.pp.ru">phd@phd.pp.ru</a>> wrote:<br>> > ><br>> > > 0b101010<br>> > > 0c660<br>> > > 0xffe<br>> > ><br>> > > I.e. the first letter from "bin", the second from "oct", the third from
<br>> > > "hex". Also "0c" resembles "oc" from "oct".<br>> ><br>> > -1 on "c" It's too visually close to "0" in some fonts.<br>> >
<br>> > +1 on "t"<br>> ><br>> > "t" does not appear in 'binary' or 'hexadecimal'<br>> > "x" does not appear in 'binary' or 'octal'<br>> > "b" does not appear in 'octal' or 'hexadecimal'
<br>> ><br>> > And finally "c" means "character" in %s or PEP3101, and "t" is not yet<br>> > defined as a type specifier.<br>> ><br>> > So just to couch it all in terms of a proposal:
<br>> ><br>> > - In 2.6 and 3.0, we add 0t1234 as a valid octal number<br>> > - In 2.6, we issue a deprecation warning for a leading literal 0 which<br>> > is followed immediately by another digit.
<br>> > - In 3.0, that becomes an exception<br>> > - If people really are still using octal that much, we should also<br>> > consider adding it in to PEP3101.<br>> ><br>> > Regards,<br>> > Pat
<br>> > _______________________________________________<br>> > Python-3000 mailing list<br>> > <a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br>> > <a href="http://mail.python.org/mailman/listinfo/python-3000">
http://mail.python.org/mailman/listinfo/python-3000</a><br>> > Unsubscribe: <a href="http://mail.python.org/mailman/options/python-3000/guido%40python.org">http://mail.python.org/mailman/options/python-3000/guido%40python.org
</a><br>> ><br>><br>><br>> --<br>> --Guido van Rossum (home page: <a href="http://www.python.org/~guido/">http://www.python.org/~guido/</a>)<br>><br>_______________________________________________<br>
Python-3000 mailing list<br><a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-3000">http://mail.python.org/mailman/listinfo/python-3000</a><br>Unsubscribe:
<a href="http://mail.python.org/mailman/options/python-3000/thomas%40python.org">http://mail.python.org/mailman/options/python-3000/thomas%40python.org</a><br></blockquote></div><br><br clear="all"><br>-- <br>Thomas Wouters <
<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!