Would there be any disadvantage to checking for filename.py whenever filename is not found so that "super.py" could be invoked with either "python super.py" or "python super"?
Raymond Hettinger
Would there be any disadvantage to checking for filename.py whenever filename is not found so that "super.py" could be invoked with either "python super.py" or "python super"?
It feels horribly DOS-like. Why? To save typing three characters? Why not rename the file then?
Would "python super.py" also look for super.py.py if super.py didn't exist? What would the error message say?
--Guido van Rossum (home page: http://www.python.org/~guido/)
Raymond Hettinger wrote:
Would there be any disadvantage to checking for filename.py whenever filename is not found so that "super.py" could be invoked with either "python super.py" or "python super"?
How about super.pyc? What if both super.pyc and super.py exist but are not equal in effect? I think the idea is not necesarry. I think most people have <tab> configured to do commandline completion, so 'python supe<tab>' would probably achieve the same effect with the same amount of keystrokes. The disadvantage is, in my opinion, sideways: people get used to it, and it is not a good habit, because it's called super.py, not super. I don't like this proposal, I'd give it a -0 in case anyone is interested.
yours, Gerrit.