Re: [Modeling-users] Multi-line comments in pymodels
Status: Abandoned
Brought to you by:
sbigaret
|
From: Mario R. <ma...@ru...> - 2003-11-10 15:00:29
|
ooops, sorry to bother everyone with this message -- I should
have better done to have a siesta instead! (Commenting list items
using ''' is invalid code, and list items that look like python blocks
are still list items ;-\ )
mario
> Hi,
>
> another little snag -- if, while developing a pymodel, I comment
> out an entity or an assoc using triple quotes, for example:
>
> model.entities = [
> Entity('One', ... ),
> '''
> Entity('Two', ... ),
> '''
> Entity('Three', ... ),
> ]
>
> then validation of the model fails with:
>
> Loading the model...
> Serious: couldn't load the model
> exceptions.ValueError
> Unable to handle python file <file>
> Reason: exception raised:
> Traceback (most recent call last):
> File "/usr/lib/python2.2/site-packages/Modeling/Model.py", line 158,
> in loadModel
> module=imp.load_module(modulename,file,pathname,description)
> File "<string>", line 129
> Entity('Three',
> ^
> SyntaxError: invalid syntax
>
> If I use # instead, it works fine.
|