This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo
Date 2008-01-19.18:55:48
SpamBayes Score 0.000458003
Marked as misclassified No
Message-id <>
Can you guess why importing the attached does nothing, without
printing "hello" at all?

The real issue shown in that example is that 'return' and 'yield'
outside a function are ignored instead of giving a SyntaxError if they
are optimized away by 'if 0:'.  

(Hint about the yield sets the CO_GENERATOR flag before it gets
optimized away.  So clearly, that's a way to comment out a whole module
-- just put "if 0: yield" anywhere at top-level...)
Date User Action Args
2008-01-19 18:55:50arigosetspambayes_score: 0.000458003 -> 0.000458003
recipients: + arigo
2008-01-19 18:55:50arigosetspambayes_score: 0.000458003 -> 0.000458003
messageid: <>
2008-01-19 18:55:49arigolinkissue1875 messages
2008-01-19 18:55:49arigocreate