Tim Peters <t...@python.org> added the comment:

The binary power operator (`**`) has higher precedence than the unary negation 
operator (`-`).

That is, -x**y groups as -(x**y).

Not a bug - that's how it was designed and how it's documented.

Note that this isn't novel, either. For example, to give just one example of 
many, that's how Maxima does it too:

(%i1) -2**3;
(%o1) -8

----------
nosy: +tim.peters

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44692>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to