In article <mailman.815.12 10287883.12834. python-list@python.org >,
Michael Torrie <torriem@gmail. comwrote:
Yeah, it's just the standard parser. For other situations Python does
fine. E.g.
In [1]: x=-1
In [2]: x**0
Out[2]: 1
--
-- Lou Pecora
Michael Torrie <torriem@gmail. comwrote:
wxPythoner@gmai l.com wrote:
>
No python is correct. you're expression parses this way, when converted
to a lisp-ish prefix expression:
>
(- (123 ** 0 ))
Have a look at this:
-1
The result is not correct, because every number (positive or negative)
raised to the power of 0 is ALWAYS 1 (a positive number 1 that is).
>>-123**0
The result is not correct, because every number (positive or negative)
raised to the power of 0 is ALWAYS 1 (a positive number 1 that is).
No python is correct. you're expression parses this way, when converted
to a lisp-ish prefix expression:
>
(- (123 ** 0 ))
fine. E.g.
In [1]: x=-1
In [2]: x**0
Out[2]: 1
--
-- Lou Pecora