> Contrary to Guido's keynote last week <wink> there are still two warts I > know of in the current CPython. One is the fact that keywords cannot be used > as identifiers anywhere, the other is the fact that 'continue' can still not > be used inside a 'finally' clause. If I remember correctly, the latter isn't > too hard to fix, it just needs a decision on what it should do :) > > Currently, falling out of a 'finally' block will reraise the exception, if > any. Using 'return' and 'break' will drop the exception and continue on as > usual. However, that makes sense (imho) mostly because 'break' will continue > past the try/finally block and 'return' will break out of the function > altogether. Neither have a chance of reentering the try/finally block > altogether. I'm not sure if that would make sense for 'continue' inside > 'finally'. > > On the other hand, I'm not sure if it makes sense for 'break' to continue > but for 'continue' to break. :) If you can fix it, the semantics you suggest are reasonable: continue loses the exception and continues the loop. > As for the other wart, I still want to fix it, but I'm not sure when I get > the chance to grok the parser-generator enough to actually do it :) Yes, that was on the list once but got dropped. You might want to get together with Finn and Samuele to see what their rules are. (They allow the use of some keywords at least as keyword=expression arguments and as object.attribute names.) --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