Message86328
| Author |
mark.dickinson |
| Recipients |
mark.dickinson |
| Date |
2009年04月22日.20:27:14 |
| SpamBayes Score |
5.4096116e-08 |
| Marked as misclassified |
No |
| Message-id |
<1240432040.03.0.737640809301.issue5816@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here's a patch that:
1. greatly simplifies the complex parsing code in Objects/complexobject.c
2. allows nans and infinities in constructing a complex number from
a string
3. fixes missing out-of-memory checks (PyOS_ascii_strtod can fail due to
lack of memory).
Note that part 2. comes entirely for free with the parsing simplification.
But it seems to me that if float('inf') is valid, then complex('inf')
should be valid too. There are potential uses for being able to create a
complex infinity when working with the complex projective plane (a natural
domain for rational functions over the complex numbers). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年04月22日 20:27:20 | mark.dickinson | set | recipients:
+ mark.dickinson |
| 2009年04月22日 20:27:20 | mark.dickinson | set | messageid: <1240432040.03.0.737640809301.issue5816@psf.upfronthosting.co.za> |
| 2009年04月22日 20:27:18 | mark.dickinson | link | issue5816 messages |
| 2009年04月22日 20:27:17 | mark.dickinson | create |
|