[Patches] Making modules callable when they have the attribute "__call__"
Pekka Pessi
Pekka.Pessi@nokia.com
Fri, 14 Apr 2000 19:17:04 +0300 (EEST)
Skip Montanaro <skip@mojam.com> writes:
> Pekka> Attached you find patches that make modules callable when
> Pekka> they have an attribute "__call__". I think that this makes
> Pekka> Python mode orthogonal. YMMV.
>Can you provide some motivation for making modules callable? It's not
>obvious to me that it buys you anything.
If we have a simple extension module, say, md5, that basically
defines one class/object type, say, md5, it is much cleaner to
define that class/object type also as __call__. Now the single
object type is sometimes called "new", sometimes something else.
Pekka