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   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to