Cesare Di Mauro wrote: > I agree: Python's with statement does have a completely different > meaning of the same Pascal & Co 's statement. > > However, I don't agree with the FAQ on this point. I think that a > Pascal-like with statement can be achieved, even with a dynamic > language such as Python, and in a simple way. It isn't that a Pascal-with-style statement can't be achieved, it's that it is pointless syntactic sugar in Python. Just use o = long_complicated_object_name instead. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
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