[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Tim Peters
Tim Peters added the comment: Then please take it to python-ideas? The issue tracker isn't a right place for endless argument. python-ideas is. This is my last response here. -- ___ Python tracker __

[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Marco Sulla
Marco Sulla added the comment: > >>> int(1e100) > 1159028911097599180468360808563945281389781327557747838772170381060813469985856815104 . Oh my God... I'm just more convinced than before :-D > Ya, this change will never be made - give up gracefully :-) Well, even if i

[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Tim Peters
Tim Peters added the comment: Ya, this change will never be made - give up gracefully :-) 1e100 and 10**100 aren't just of different types, they have different mathematical _values_ now: >>> 1e100 == 10**100 False >>> int(1e100) 11590289110975991804683608085639452813897813275

[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Marco Sulla
Marco Sulla added the comment: All the examples you mentioned seems to me to fix code, instead of breaking it. About 1e300**1, it's not a bug at all. No one can stop you to full your RAM in many other ways :-D About conventions, it does not seems to me that Python cares about other lang

[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Integers are implicitly converted to floats in operations with floats. > How can this change break old code? # Status quo print(1e60 + 1) => prints 1e+60 # In the future: => prints 10001 # Status qu

[issue39788] Exponential notation should return an int if it can

2020-02-29 Thread Marco Sulla
Marco Sulla added the comment: Sorry, but I can't figure out what code can break this change. Integers are implicitly converted to floats in operations with floats. How can this change break old code? > if you are worried about the performance No, I'm worried about the expectations of coder

[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with both Eric and Zachary, but I just wanted to point out that in a Python interpreter with a keyhole optimizer, you can expect that expressions like `1*10**9` to be a constant: # Python 3.5 py> from dis import dis py> dis('1*10**9') 1

[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Zachary Ware
Zachary Ware added the comment: Agreed with Eric. -- nosy: +zach.ware resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Eric V. Smith
Eric V. Smith added the comment: I strongly disagree. Even if I thought it was a good idea (I don't), we'd break too much code by making this change now. -- nosy: +eric.smith ___ Python tracker

[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Marco Sulla
New submission from Marco Sulla : (venv_3_9) marco@buzz:~/sources/python-frozendict$ python Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> a = 1E9 >>> type(a) IMHO i