Array of 2^n
Andreas Kostyrka
andreas at mtg.co.at
Tue Oct 23 05:47:19 EDT 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Sonntag, 21. Oktober 2001 22:31 schrieb Moshe:
> John Thingstad had nothing better to do than to say:
> > l = [2**i for i in range(10)]
>
> I definitely like this way more than the lambda way, because it is far
> more readable.
Well, at least for python 2.0 (SuSE 7.2) this way is also about 25% slower
than map/lambda (7 seconds to 10 seconds wall time).
Which is sad, because I like the new syntax much better than the lambda one :(
Has it been sped up in later versions?
Andreas
- --
Andreas Kostyrka; Raiffeisenstr. 16/9; 2320 Zwölfaxing
Tel: +43/676/4091256; Fax: +43/1/7065299
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE71TyrHJdudm4KnO0RAjazAKDcY6f+05/i4kK1P4rHTLDVDyzLMgCdFfwN
vjHex+ntYlqIewtzTC2K/qQ=
=4iRJ
-----END PGP SIGNATURE-----
More information about the Python-list
mailing list