On Mon, 10 Jul 2000, Thomas Wouters wrote: > Here's how it works: > > >>> for x in [1,2,3,4,5]; y in ['a','b','c','d','e','f','g']: > ... print x, y > ... > 1 a > 2 b > 3 c > 4 d > 5 e > >>> +1 on the concept anyway > If this is deemed undesirable, it would be trivial to add a new bytcode, > FORMORE_LOOP or such, that handles the multiple-list type of for loop. I > almost went ahead and did that, but decided I'd try for a patch that > *doesn't* add bytecodes for a change ;) Unfortunately, the patch is binary > incompatible, so the bytecode magic does have to be changed. It's all right, any patch would be binary incompatible > I'll do some more testing on this, write some docs and some tests, and if > noone here has convinced me otherwise, upload it to sourceforge ;) The patch > is really suprisingly small and elegant, thanks to Python's extreme > simplicity! Hmmmm... I still think there should be a FOR_MORELOOP, but I think this specific patch should be uploaded to SF so we can play with this a bit. -- Moshe Zadka <moshez@math.huji.ac.il> There is no GOD but Python, and HTTP is its prophet. http://advogato.org/person/moshez
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4