Re: Bug report with dynamic

Ernesto Revilla <[email protected]> Fri, 25 Jun 2004 17:36:09 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
In PyModel, line 971:  v=apply(v.method, l), the function is evaluated 
and substituted by it's value, so:
<function identity at 0x00FD2C70>('name',)  will turn into
'TheModel' and this will be stored in object, so packageName is not a 
function anymore.

Erny

Ernesto Revilla escribió:

> Dear Sébastien,
>
> going through dynamic, I'm really impressed. (I can learn a lot of 
> stuff from you). Although I still did no tests, here what seems a bug 
> to me:
>
> When I do the following, I get an error (CVS version):
>
> >>> from Modeling.PyModel import Model, Entity, AString
> >>> from Modeling import dynamic
> >>> m=Model("TheModel")
> >>> e=Entity("Person",properties=[AString("name")]
> >>> m.entities.append(e)
> >>> dynamic.build(m)
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "C:\prg\python23\Lib\site-packages\Modeling\dynamic.py", line 
> 153, in build
>     module_name=model.packageName()
> TypeError: 'str' object is not callable
>
> May be this is not  a bug? The: m=Model("TheModel")   should create an 
> empty model.
>
> With regards,
> Erny
>
>
>
>