'with' statement in python ?

Mark Hadfield m.hadfield at niwa.cri.nz
Mon Jun 25 23:50:58 CEST 2001


From: "asgard" <asgard at hellnet.cz>


> Hello,
> writing self before every object's method really drives me
> crazy. Shouldn't there be 'with' statement like in Pascal, ie.

There was an extensive discussion on this recently. Perhaps you'd like to
try a search on Google Groups. IIRC the consensus was that adding this to
Python would not be a good idea, because when "with" blocks are nested they
become hard to read and possibly ambiguous.

---
Mark Hadfield
m.hadfield at niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



-- 
Posted from clam.niwa.cri.nz [202.36.29.1] 
via Mailgate.ORG Server - http://www.Mailgate.ORG



More information about the Python-list mailing list