"Nick Coghlan" <ncoghlan at gmail.com> wrote in message news:426CB7C2.8030508 at gmail.com... > Guido van Rossum wrote: > > statement expansion", I think we can expect EXPR to produce a value > > that is already an iterator (rather than merely an interable). > > Not supporting iterables makes it harder to write a class which is > inherently usable in a with block, though. The natural way to make > iterable classes is to use 'yield' in the definition of __iter__ - if > iter() is not called, then that trick can't be used. Would not calling iter() (or .__iter__) explicitly, instead of depending on the implicit call of for loops, suffice to produce the needed iterator? tjr
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