[Python-Dev] Better text processing support in py2k?
Andrew M. Kuchling
akuchlin@mems-exchange.org
Tue, 28 Dec 1999 17:00:11 -0500 (EST)
Skip Montanaro writes:
>What AMK says makes perfect sense until you examine some of the other things
>that are in the language, like the Ellipsis object and complex numbers. If
>I recall correctly both were added as a result of the NumPy package
>development.
True, but note that you can compile Python with WITHOUT_COMPLEX
defined to remove complex numbers.
> 1. When using something like the simple file i/o idiom
> for line in f.readlines():
> dofunstuff(line)
> the programmer should not have to care how big the file is.
What about 'for line in fileinput.input()', which already exists?
(Hmmm... if you have an already open file object, I don't think you
can pass it to fileinput.input(); maybe that should be fixed.)
On a vaguely related note, since there are many things like parser
generators and XML stuff and mxTextTools, I've been speculating about
a text processing topic guide. If you know of Python packages related
to text processing, please send me a private e-mail with a link.
--
A.M. Kuchling http://starship.python.net/crew/amk/
Constraints often boost creativity.
-- Jim Hugunin, 11 Feb 1999