Patrick Maupin a écrit : > A string > replace on a data file is actually much easier than on a code file, > and it really is a one-liner, so the potential existence of upper case > 'X' in the data file does not seem like reason enough to make these > different. > you don't analyse data files for a living, do you :-)
As a physicist, I have to open many kinds of data files with the weirdest formats. Of course, some of them could not reasonably be supported by the python builtins, but it doesn't have to be made unnecessary difficult either. "Be liberal in what you accept". However, I usually don't have to guess the base of my data, so this really applies mostly to float(s), int(s), and int(s, base) with base != 0. Cheers, Baptiste _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
