Message106213
| Author |
meador.inge |
| Recipients |
mark.dickinson, meador.inge |
| Date |
2010年05月21日.04:26:36 |
| SpamBayes Score |
2.5006528e-07 |
| Marked as misclassified |
No |
| Message-id |
<1274416001.27.0.462373579698.issue8748@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
2.7 patch attached. The implementation is mostly the same as the 3.2 one, but there is one quirk. Namely, 2.7 (and other 2.x's) has the following odd behavior:
>>> 1j < None
False
>>> 1j < 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: no ordering relation is defined for complex numbers
To perserve this behavior I had to do the type checks for 'int', 'long', 'complex', and 'float' at the beginning. I tried 'PyNumber_Check' first, but it returns 1 for old-style classes since the number protocol is filled in for the 'instance' type. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年05月21日 04:26:41 | meador.inge | set | recipients:
+ meador.inge, mark.dickinson |
| 2010年05月21日 04:26:41 | meador.inge | set | messageid: <1274416001.27.0.462373579698.issue8748@psf.upfronthosting.co.za> |
| 2010年05月21日 04:26:39 | meador.inge | link | issue8748 messages |
| 2010年05月21日 04:26:36 | meador.inge | create |
|