break in a module

Cameron Simpson cs at zip.com.au
Tue Jun 21 08:06:04 EDT 2011


On 21Jun2011 20:04, I wrote:
| So the caller does an:
| 
|   import foo
| 
| as normal, with no special wrapping. And the module goes:
| 
|   spam()
|   if condition:
|     raise StopIteration
|   ham()
|   cheese()

Of course, that should be StopImport, not StopIteration.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Agree, for Law is costly. -- Very good advice to litigious Persons, founded
upon Reason and Experience; for many Times the Charges of a Suit exceed the
Value of the Thing in Dispute. - Bailey's dictionary, 1736



More information about the Python-list mailing list