Callable modules?

Stefan Schwarzer sschwarzer at sschwarzer.net
Mon Jul 22 13:23:13 EDT 2002


Hello Paul

Paul Rubin wrote:
> Just to not have to say "foo.foo()" or "from foo import foo".
> 
> If the main purpose of the module is to provide one function, I think
> it's cleaner to be able to import the module and call the function
> without special tricks.

I consider it cleaner to be explicit, and import the module and call its function. :-)

How many actual cases do you know of where a module has a single function?
Aren't they rare?

Stefan




More information about the Python-list mailing list