[Python-ideas] making a module callable

Gregory P. Smith greg at krypto.org
Tue Nov 19 18:51:21 CET 2013


While I don't ordinarily endorse this use case it'd be nice not to require
hacks involving sys.modules monkeying such as:

https://github.com/has207/flexmock/pull/89
specifically:
https://github.com/has207/flexmock/commit/bd47fa8189c7dff349de257c0e061b9fcea2330d

to make a module callable.

This obviously touches on the larger ideas of what is a module vs a class
and why are they different given that they're "just" namespaces.

(sorry. not offering ideas myself just hoping others have them)

-gps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131119/39ba35f2/attachment.html>


More information about the Python-ideas mailing list