On 5/17/2011 10:39 PM, Greg Ewing wrote: > Personally I think that the default literal syntax for > bytes, and also the form produced by repr(), should have > been something more neutral, such as hex, with the ascii > form available for use when it makes sense. > Much nicer would be > > some_var = x'deadbeef' > > As for > >> --> some_other_var[3] == b'd' > > there ought to be a literal for specifying an integer > using an ascii character, so you could say something like > > if some_other_var[3] == c'd': > > which would be equivalent to > > if some_other_var[3] == ord(b'd') > > but without the overhead of computing the value each time > at run time. +1 Seems this could be added compatibly? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20110517/17ceb88f/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4