oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #01441
Re: [Bug 614863] Re: openehr.Pathable class needs parent() and name() methods
Em 01/09/10 12:43, Eduardo César escreveu:
> Wagner, I put a "parent=None" in the constructor of the Locatable class to
> address those issues and the other bugs. I did not commit yet because some
> tests are still failing after I did this. I don't know if that one is a good
> approach either, maybe we can exchange some ideas about this matter.
>
Use a method instead of an attribute sounds better,IHMO. Use a method
allows avoid unexpected states in a clear form. An important thing that
you must have keep in mind that the __parent__ and __name__ are related
to the zope container mechanism. It means that when a code like this "
container[name] = locatable" is called a will redefining the the parent
which will be container and __name__ will be the archetypeNodeId .
This is defined using the zope event system.
Summarizing: those attributes can be overriden without you expected.
Be careful when you define then.
--
openehr.Pathable class needs parent() and name() methods
https://bugs.launchpad.net/bugs/614863
You received this bug notification because you are a member of OSHIP
Development Team, which is a bug assignee.
Status in Open Source Health Information Platform (OSHIP): New
Bug description:
See this discussion.
https://bugs.launchpad.net/oship/+bug/608831/comments/4
Follow ups
References