A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-January/060274.html below:

[Python-Dev] Octal literals

[Python-Dev] Octal literals [Python-Dev] Octal literalsAndrew Koenig ark at acm.org
Tue Jan 31 23:17:22 CET 2006
> Apart from making 0640 a syntax error (which I think is wrong too),
> could this be solved by *requiring* the argument to be a string? (Or
> some other data type, but that's probably overkill.)

That solves the problem only in that particular context.

I would think that if it is deemed undesirable for a leading 0 to imply
octal, then it would be best to decide on a different syntax for octal
literals and use that syntax consistently everywhere.

I am personally partial to allowing an optional radix (in decimal) followed
by the letter r at the beginning of a literal, so 19, 8r23, and 16r13 would
all represent the same value.



More information about the Python-Dev mailing list

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