Message86328
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). |
|
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 | |
|