[Patches] [ python-Patches-911176 ] move test() in SimpleDialog.py
SourceForge.net
noreply at sourceforge.net
Mon Mar 22 17:00:39 EST 2004
Patches item #911176, was opened at 2004-03-07 01:16
Message generated for change (Comment added) made by loewis
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: Closed
>Resolution: Accepted
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.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2004-03-22 23:00
Message:
Logged In: YES
user_id=21627
Thanks for the patch. Applied as SimpleDialog.py 1.5.
----------------------------------------------------------------------
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