for a in range(1000000) :

Gerrit Holl gerrit at nl.linux.org
Sun Jun 15 11:38:26 EDT 2003


Maurix wrote:
> Thanks, exactly what i mean! And it was a built-in function! I'm blind!

You may also be interested in itertools.repeat, included with Python
as of Python 2.3. It is even faster. See this post by Alex Martelli
on the python-dev mailinglist:

http://mail.python.org/pipermail/python-dev/2003-June/036359.html

FWIW, I have sent a docpatch to include this information in the
standard library documentation:

http://sourceforge.net/tracker/index.php?func=detail&aid=754632&group_id=5470&atid=305470

yours,
Gerrit.

-- 
129. If a man's wife be surprised (in flagrante delicto) with another
man, both shall be tied and thrown into the water, but the husband may
pardon his wife and the king his slaves.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/





More information about the Python-list mailing list