7 Jul
2002
7 Jul
'02
8:21 p.m.
Wolfgang Strobl writes:
On 5 Jul 2002, at 22:53, Dieter Maurer wrote:
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 ;-)
I would have called it _set__name__, setName or something, but not setId.
Is it necessary? Each Zope site object needs an id!
But _setId doesn't set an id! It does....
You are confused by the fact that some object types use the "__name__" attribute to remember their id. They are allowed to do this as it is an implementation detail. Use "_setId" to set the id and "getId" to fetch it. Leave it to the object type how it stores the id internally. Dieter