[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread ricitron
New submission from ricitron ricit...@mac.com: I would like to be able to read in data that uses scientific notation with a D instead of an E. This is possible on windows and other builds, but not on Mac OSX. example: float('1.23D+04') Traceback (most recent call last): File stdin, line 1,

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: str-float conversions have been reworked in 2.7 and 3.1. The 'D' exponent will not on any platform starting with those versions. So, this would be a non-platform specific feature request. -- assignee: ronaldoussoren - components:

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: That was supposed to say: The 'D' exponent will not work on any platform starting with those versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7919

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Out of curiosity, where are your data coming from? For Python, this seems like a needless complication. It should be simple enough to replace the 'D's with 'E's prior to passing the strings to float. I notice that some varieties of Lisp

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread ricitron
ricitron ricit...@mac.com added the comment: I am running python 2.5.4. While it works on linux and windows, it does not work on mac. Fortran doubles are output using the D notation. If I am importing a large amount of data, I would rather not do a search and replace every time before

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Sorry, I'm -1 on this: outside Fortran, using 'E' for the exponent marker seems to be near universal. It just doesn't seem worth adding the extra complication to the Python code, or going through all the various places that expect an 'e'

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I would rather not do a search and replace every time before reading in the data. There's no need to do a search and replace *before* reading the data: read the data first, then have Python do the replace for you before passing each

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Unless and until we implement 'd' exponents, we should add a test to make sure they don't work. That they ever worked on any platform was a surprise. -- Eric. -- title: reading scientific notation using d instead of e on max osx -

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Done in r78166 (trunk), r78167 (py3k). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7919 ___

[issue7919] reading scientific notation using d instead of e on max osx

2010-02-12 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'm -1 on this, too. Closing. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7919