Re: [Python-ideas] Replacing the if __name__ == "__main__" idiom (was Re: making a module callable)

Nov. 26, 2013
3:45 a.m.
I still don't think the current idiom is problematic, so I'm -0.8 on the whole thing :-)
I'm with Antoine. I don't find it particularly onerous to type (how often do you start a new program/script from scratch anyway?), and if it was a big enough barrier, I'd capture the keystrokes in an Emacs macro (including skeletal main and usage functions, and corresponding imports of sys and os modules). I trust vim users could do something similar. Skip
4131
Age (days ago)
4131
Last active (days ago)
0 comments
1 participants
participants (1)
-
Skip Montanaro