mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Continue rolling back pep-3141 changes that changed behavior from 2.5. This
round included: * Revert round to its 2.6 behavior (half away from 0). * Because round, floor, and ceil always return float again, it's no longer necessary to have them delegate to __xxx___, so I've ripped that out of their implementations and the Real ABC. This also helps in implementing types that work in both 2.6 and 3.0: you return int from the __xxx__ methods, and let it get enabled by the version upgrade. * Make pow(-1, .5) raise a ValueError again.
This commit is contained in:
parent
f7476c4d46
commit
9871d8fe22
13 changed files with 75 additions and 252 deletions
|
|
@ -801,8 +801,7 @@ were of integer types and the second argument was negative, an exception was
|
|||
raised).
|
||||
|
||||
Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`.
|
||||
Raising a negative number to a fractional power results in a :class:`complex`
|
||||
number. (Since Python 2.6. In earlier versions it raised a :exc:`ValueError`.)
|
||||
Raising a negative number to a fractional power results in a :exc:`ValueError`.
|
||||
|
||||
|
||||
.. _unary:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue