merical
algorithms and hoping to make the language smart enough to "just
work" for them, then I'm afraid it's hopeless. I'm far from a
beginner, but I don't think I could implement a non-trivial
numerical algorithm. (Well, I could make it work, but I'm betting
it
unsurprised to learn that it doesn't handle file sizes larger
than MAXINT on your box... hardly any OS's allowed such a thing back
then. I recomend using a newer version... 2.4.1 is quite nice.
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
eone else will write
in to point one out.
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
e elegant
as well.
If you look at a problem and are nearly certain that it needs to be
solved using exec, try posting it here... the people on this newsgroup
are very good at solving challenges like that. But try it yourself
first... you may learn something.
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
ast):
> File "", line 1, in ?
> IndexError: no such group
Because the name of the named group in your example is 'm' not 'maybe'. 'maybe'
is the text to match. Try it like this:
>>> import re
>>> m = re.match('(?Pmaybe)?yes', "yes")
>>> print m.group(1)
None
>>> print m.group('m')
None
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
execute the child program.
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
the
> readahead buffer used by the file iterator is 8192 bytes, which clearly
> might be too much.
Jp Calderone writes:
> def iterread(fobj):
> return iter(fobj.readline, '')
Thanks folks... that did it nicely!
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list
lly testing them. If you don't have time to test,
then just don't optimize... write whatever is most readable. If you
NEED more speed, then profiling and testing will show you what to
fix. (Using a better algorithm is a different story... do that
whenever you need it.)
-- Michael Chermside
--
http://mail.python.org/mailman/listinfo/python-list