-1/2

drobinow at gmail.com drobinow at gmail.com
Mon Jun 23 03:57:26 CEST 2008


On Jun 22, 2:32 pm, "Serve Lau" <ni... at qinqin.com> wrote:
> What is the expected result of -1/2 in python?

I would say -1, but it depends on whether the "-" is a unary minus.

>>> -1/2
-1
>>> 3 -1/2
3



More information about the Python-list mailing list