5 Jul
2002
5 Jul
'02
8:53 p.m.
Wolfgang Strobl writes:
... What is the purpose of myInstance._setId(id)? "_setId" is very well named.
This well chosen name makes questions as the above superfluous ;-)
Is it necessary? Each Zope site object needs an id!
Depending on the object type, the id can be provided in a different way. But, it is a very good idea to use "_setId". This is very clear and explicit.
... Now _setObject in ObjectManager already adds a string attribute named "id". Are you sure?
When I just tried to verify your statement, I have been unable to see that the "set" object gets an "id" attribute...
So in fact _setId seems redundant and should be eleminated from the API. Don't remove the clear and well named methods from the API!
Dieter