doc says that it must be > 0, or < 0, but it seems that it returns +1 or -1. Can it be reliably used to get the sign of x: cmp(x, 0) like pascal Sign() function does? I mean, I'm pretty sure that it can be used, but is it mentioned somewhere in language spec, or it may be implementation defined? If so, any other simple means of _reliably_ getting the sign? -- http://mail.python.org/mailman/listinfo/python-list
- cmp() on integers - is there guarantee of returning on... Dmitry Anikin
- Re: cmp() on integers - is there guarantee of ret... Paul Rubin
- Re: cmp() on integers - is there guarantee of ret... [EMAIL PROTECTED]
- Re: cmp() on integers - is there guarantee of ret... skip
- Re: cmp() on integers - is there guarantee of ret... skip
- Re: cmp() on integers - is there guarantee of ret... Alex Martelli
- Re: cmp() on integers - is there guarantee of... Christoph Zwerschke
- Re: cmp() on integers - is there guarante... Paul Rubin
- Re: cmp() on integers - is there guarantee of ret... Alex Martelli