[Python-ideas] PEP for executing a module in a package containing relative imports

Christian Heimes lists at cheimes.de
Sun Apr 22 23:08:57 CEST 2007


Steven Bethard wrote:
> While that would address my concern, I wonder if adding sys to the
> builtins is really any better than adding __main__ to the builtins.

If I understand the proposal right then __main__ won't be a builtin. 
Each module would get a new global variable __main__ which is set either 
to True or False.

Also I consider sys kinda reserved for the sys module while the __main__ 
global var approach would reserve a new name that I like to see used for 
something else.

+0.25 for sys in builtins

Christian




More information about the Python-ideas mailing list