[Python-ideas] a standard approach to module-replace-itself-in-sys.modules

Barry Warsaw barry at python.org
Thu Mar 13 21:06:29 CET 2014


On Mar 13, 2014, at 08:54 AM, Brett Cannon wrote:

>Do we actually want to promote this practice by codifying support for it in
>the stdlib? If you're doing this to get decorators for module attributes
>then you should say this is for that goal and the solution is getting the
>module swapping hack to be easier to use (and might call for a better
>solution). Otherwise this proposal feels like it's trying to codify
>behaviour that is rarely necessary.

I don't think it necessarily has to be promoted as something we want people to
generally do, but if they're going to do it I do think it would be nice to
have a bless (i.e. stdlib) way.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140313/09953f01/attachment-0001.sig>


More information about the Python-ideas mailing list