This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:20mark.dickinsonsetrecipients: + mark.dickinson
2009-04-22 20:27:20mark.dickinsonsetmessageid: <1240432040.03.0.737640809301.issue5816@psf.upfronthosting.co.za>
2009-04-22 20:27:18mark.dickinsonlinkissue5816 messages
2009-04-22 20:27:17mark.dickinsoncreate