[issue23429] -5**4 returns -625 instead of 625
Serhiy Storchaka
report at bugs.python.org
Tue Feb 10 18:43:16 CET 2015
Serhiy Storchaka added the comment:
No, -5 is not an atom. See The Python Language Reference [1]:
"""Note that numeric literals do not include a sign; a phrase like -1 is actually an expression composed of the unary operator ‘-‘ and the literal 1."""
[1] https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23429>
_______________________________________
More information about the Python-bugs-list
mailing list