[Python-ideas] making a module callable
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Nov 26 00:43:25 CET 2013
Ben Finney wrote:
> Automatically discarding the first argument, on the assumption that the
> program doesn't care about it, is making a false assumption in many
> cases and makes a common use case needlessly difficult.
If you're talking about doing different things based on
argv[0], I wouldn't call it a *common* use case. The last
time I saw it done was on an early version of SunOS that
didn't have shared libraries, so they linked all the gui
tools into one big executable to reduce disk and memory
usage.
Now that we have shared libraries, there's much less
need for that kind of trick.
--
Greg
More information about the Python-ideas
mailing list