> > - putting arbitrary initialization code in <init> > > Not sure what's "arbitrary", unless you mean unrelated to the > iteration variable. Yes, that. > I guess my archetype of the cute C for-loop is the idiom for > pointer-list traversal: > > struct foo {int data; struct foo *next;} *ptr, *head; > > for (ptr = head; *ptr; ptr = ptr->next) > do_something_with(ptr->data) > > This is elegant. It separates the logic for list traversal from the > operation on the list element. And it rarely happens in Python, because sequences are rarely represented as linked lists. > Not the highest on my list of wants -- I'd sooner have ?: back. I submitted > a patch for that once, and the discussion sort of died. Were you dead > det against it, or should I revive this proposal? Not dead set against something like it, but dead set against the ?: syntax because then : becomes too overloaded for the human reader, e.g.: if foo ? bar : bletch : spam = eggs If you want to revive this, I strongly suggest writing a PEP first before posting here. --Guido van Rossum (home page: http://www.python.org/~guido/)
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