[Python-Dev] PEP 515: Underscores in Numeric Literals
Serhiy Storchaka
storchaka at gmail.com
Thu Feb 11 12:19:17 EST 2016
More information about the Python-Dev mailing list
Thu Feb 11 12:19:17 EST 2016
- Previous message (by thread): [Python-Dev] PEP 515: Underscores in Numeric Literals
- Next message (by thread): [Python-Dev] PEP 515: Underscores in Numeric Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11.02.16 14:14, Georg Brandl wrote: > On 02/11/2016 11:17 AM, Serhiy Storchaka wrote: > >>> **Group 3: only between digits, only one underscore** >>> >>> * Ada [8]_ >>> * Julia (but not in the exponent part of floats) [9]_ >>> * Ruby (docs say "anywhere", in reality only between digits) [10]_ >> >> C++ is in this group too. >> >> The documentation of Perl explicitly says that Perl is in this group too >> (23__500 is not legal). Perhaps there is a bug in Perl implementation. >> And may be Swift is intended to be in this group. >> >> I think we should follow the majority of languages and use simple rule: >> "only between digits". >> >> I have provided an implementation. > > Thanks for the alternate patch. I used the two-function approach you took > in ast.c for my latest revision. > > I still think that some cases (like two of the examples in the PEP, > 0b_1111_0000 and 1.5_j) are worth having, and therefore a more relaxed > rule is preferable. Should I write an alternative PEP for strong rule?
- Previous message (by thread): [Python-Dev] PEP 515: Underscores in Numeric Literals
- Next message (by thread): [Python-Dev] PEP 515: Underscores in Numeric Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list