Manuel Alejandro CerĂ³n Estrada wrote: > Acording to PEP 255: > > Note that return isn't always equivalent to raising StopIteration: the > difference lies in how enclosing try/except constructs are treated. All that means is that def g(): try: if 0: yield return except StopIteration: print "Spam" won't print "Spam". But since this involves catching the exception with an explicit try-except, it doesn't fall under the scope of your complaint. > Of curse, the problem of low level details it's solved by 'yield break' I would put it the other way around -- the problem that 'yield break' is meant to solve is already solved by 'return'. So there's no need for change. -- Greg
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