[Python-Dev] PEP 343 and __with__
Guido van Rossum
guido at python.org
Mon Oct 3 20:07:07 CEST 2005
For the record, I very much want PEPs 342 and 343 implemented. I
haven't had the time to look at the patch and don't expect to find the
time any time soon, but it's not for lack of desire to see this
I don't like Jason's __with__ proposal and even less like his idea to
drop __enter__ and __exit__ (I think this would just make it harder to
provide efficient implementations in C).
I'm all for adding __enter__ and __exit__ to locks.
I'm even considering that it might be a good idea to add them to files.
For the record, here at Elemental we write a lot of Java code that
uses database connections in a pattern that would have greatly
benefited from a similar construct in Java. :)
On 10/3/05, Michael Hudson <mwh at python.net> wrote:
> "Phillip J. Eby" <pje at telecommunity.com> writes:
> > Since the PEP is accepted and has patches for both its implementation and a
> > good part of its documentation, a major change like this would certainly
> > need a better rationale.
> Though given the amount of interest said patch has attracted (none at
> all) perhaps noone cares very much and the proposal should be dropped.
> Which would be a shame given the time I spent on it and all the hot
> air here on python-dev...
> (who still likes PEP 343 and doesn't particularly like Jason's
> suggested changes).
> Gevalia is undrinkable low-octane see-through only slightly
> roasted bilge water. Compared to .us coffee it is quite
> drinkable. -- Måns Nilsson, asr
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev