Re: [Modeling-users] Bug report with dynamic
Status: Abandoned
Brought to you by:
sbigaret
From: Ernesto R. <er...@si...> - 2004-06-25 15:35:40
|
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 > > > > |