[Python-Dev] PEP 515: Underscores in Numeric Literals

Glenn Linderman v+python at g.nevcal.com
Thu Feb 11 14:08:49 EST 2016


On 2/11/2016 11:01 AM, Ethan Furman wrote:
> On 02/11/2016 10:50 AM, Serhiy Storchaka wrote:
> > I have strong preference for more strict and simpler rule, used by
> > most other languages -- "only between two digits". Main arguments:
>
> > 2. Most languages use this rule. It is better to follow non-formal
> > standard that invent the rule that differs from rules in every other
> > language. This will help programmers that use multiple languages.
>
> If Python followed other languages in everything:
>
> 1) Python would not need to exist; and
> 2) Python would suck  ;)
>
> If our rule is more permissive that other languages then 
> cross-language developers can still use the same style in both 
> languages, without penalizing those who want to use the extra freedom 
> in Python.

Ditto.

If people need an idea to shoot down, regarding literal constants, and 
because I couldn't find a Python-Non-Ideas list to post this in, here is 
one.  Note that it is unambiguous, does not conflict with existing 
binary literals, but otherwise sucks.  Please vote this idea down with 
emphasis:

Base 64 decoding literals:

print( 0b64_CjMy_NTM0_Mjkw_NQ )
325342905
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160211/1dfea045/attachment.html>


More information about the Python-Dev mailing list