[Python-Dev] (-1)**(1/2)==1?

Facundo Batista facundobatista at gmail.com
Mon Feb 20 16:50:35 CET 2006


2006年2月20日, Jonathan Barbero <jonathan.barbero at gmail.com>:
> Hello!
> My name is Jonathan, i´m new with Python.

Hello Jonathan. This list is only for developing Python itself, not
for developing in Python.
You should address this kind of question in comp.lang.python
(available as a newsgroup and a mailing list), see here for
instructions:
 http://www.python.org/community/lists.html
> I try this in the command line:
>> >>> (-1)**(1/2)
> 1
>> This is wrong, i think it must throw an exception.
> What do you think?

It's OK, because (1/2) is zero, not 0.5.
>>> 1/2
0
Regards,
. Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /