This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Julian, eric.snow, giampaolo.rodola, ncoghlan, nikratio, rhettinger, smarnach
Date 2011-12-13.02:21:58
SpamBayes Score 8.421829e-10
Marked as misclassified No
Message-id <1323742920.47.0.944026371829.issue13585@psf.upfronthosting.co.za>
In-reply-to
Content
I think you guys need to post your code somewhere (perhaps on PyPi or the ASPN Cookbook).  It needs to mature beyond the stage of "I just whipped-up this code and think it would be great if everybody used it".

I've seen nothing like this being used in production code (code published on the net or at one of my clients).  Context managers have been around for a while, so if this were a real need, we would expect to see people already using something like this (for example, namedtuples got introduced to the standard library upon seeing many, many reinventions of the concept and we were able to consolidate the best features from each).

Design of the a feature in the standard library should be driven by examples of real world code that would be improved with the new feature.  The design should also be informed by the experience of teaching people how to use it and seeing what they do (lots of technically correct ideas get shot down because it turns out that incorrect usage is common (a bug factory like the % formatting operator) or that people have a hard time learning and remembering the feature.

The core problem is that it is easier to add things to the standard library than to take them out if they prove to be a bad idea.  Accordingly, we need to be *really sure* that this is a good idea, that it will *improve* real world code, that people learn, understand, and remember it easily, and that is doesn't impair readability.

The example code from Nikolaus has a bug in it -- that is worrisome and may suggest that we are better-off without this being in the standard library.
History
Date User Action Args
2011-12-13 02:22:00rhettingersetrecipients: + rhettinger, ncoghlan, giampaolo.rodola, nikratio, Julian, eric.snow, smarnach
2011-12-13 02:22:00rhettingersetmessageid: <1323742920.47.0.944026371829.issue13585@psf.upfronthosting.co.za>
2011-12-13 02:21:59rhettingerlinkissue13585 messages
2011-12-13 02:21:58rhettingercreate