From: Skip Montanaro [mailto:skip at pobox.com] > Guido> No, I meant that "for x.a in mylist: ..." is valid but shouldn't > Guido> be, > Valid? I'll buy that, but it had never occurred to me. Useful? That's not > immediately obvious: Well, I'll certainly give you "not obviously useful", but... >>> class Dummy: ... def __init__(self): ... self.a = 12 ... >>> d = Dummy() >>> d.a 12 >>> [9 for d.a in range(4)] [9, 9, 9, 9] >>> d.a 3 Paul
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