#2773 HIGH Untriag: Some sugar modules are running code on import causing hard to debug performance issues
Zarro Boogs per Child
bugtracker at laptop.org
Mon Aug 13 18:09:41 EDT 2007
#2773: Some sugar modules are running code on import causing hard to debug
performance issues
---------------------+------------------------------------------------------
Reporter: J5 | Owner: tomeu
Type: defect | Status: new
Priority: high | Milestone: Untriaged
Component: sugar | Version:
Resolution: | Keywords: review?
Verified: 0 |
---------------------+------------------------------------------------------
Comment (by marco):
Replying to [ticket:2773 J5]:
> Some of the sugar python files run code outside of functions and classes
which is run every time the module is imported.
Hmmm http://docs.python.org/tut/node8.html
"A module can contain executable statements as well as function
definitions. These statements are intended to initialize the module. They
are executed only the first time the module is imported somewhere."
And the test-import testcase which I attached seem to confirm it.
What am I missing?
--
Ticket URL: <http://dev.laptop.org/ticket/2773#comment:4>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list