[Python-ideas] start, test, init
Bruce Leban
bruce at leapyear.org
Sun Dec 1 22:55:55 CET 2013
On Sun, Dec 1, 2013 at 1:13 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> > As for the testing case... I'd like for python to have a -t option that
> only sets a global name __test__ to True. Then that covers most of your
> use cases without adding a whole lot. Sometimes less is more.
> >
> > if __test__:
>
I like this idea but the specific proposal means __test__ needs to be
defined in all modules. A simple alternative:
if __name__ == '__test__':
--- Bruce
SALE! My brother's puzzle company Puzzazz <http://www.puzzazz.com> is
having a BlackFriday/CyberMonday sale http://j.mp/182R4kG - FREE puzzle
books and BOGO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131201/b9060684/attachment.html>
More information about the Python-ideas
mailing list