[Python-Dev] More on contextlib - adding back a contextmanagerdecorator (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Sun Apr 30 19:15:08 CEST 2006
- Previous message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Next message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
I believe the context API design has gotten totally out of hand. I have a counter-proposal: let's drop context.
Heh. I was about to pull out the "if the implementation is hard to explain, it's a bad idea (and bad ideas shouldn't go into 2.X)" rule last week in response to the endless nick-phillip-paul "today I put in my brain the other way" threads... ;-)
(but the design isn't really that hard to explain; it's just that ever- one seems to be missing that there are three objects involved, not two...)
But if you think we can get rid of the "with statement context object" [1], I'm all for it. "explicit is better than implicit" etc.
+1.
- Previous message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Next message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]