[Patches] [ python-Patches-911176 ] move test() in SimpleDialog.py

SourceForge.net noreply at sourceforge.net
Sat Mar 6 19:23:17 EST 2004


Patches item #911176, was opened at 2004-03-06 19:16
Message generated for change (Settings changed) made by toxnx
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=911176&group_id=5470

Category: Tkinter
Group: Python 2.3
Status: Open
Resolution: None
>Priority: 2
Submitted By: tox-the-wanderer (toxnx)
Assigned to: Martin v. Löwis (loewis)
Summary: move test() in SimpleDialog.py

Initial Comment:
The test function in SimpleDialog is named "test()" 
instead of "_test()".  Since it only is used to test the 
SimpleDialog class, at the very least it should be 
named "_test()" so it doesn't run the risk of overwriting 
a function by the same name when imported using "from 
SimpleDialog import *".

However, I propose that the function declaration for test
() be moved under "if __name__ == '__main__':", that 
way the function is explicitly not part of the SimpleDialog 
module.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=911176&group_id=5470



More information about the Patches mailing list