LINUX.ORG.RU

История изменений

Исправление KennyMinigun, (текущая версия) :

$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (-8) ** (2/3)
1
>>> (-8) ** (2.0/3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: negative number cannot be raised to a fractional power

Исправление KennyMinigun, :

python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (-8) ** (2/3)
1
>>> (-8) ** (2.0/3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: negative number cannot be raised to a fractional power

Исходная версия KennyMinigun, :

$ python