[Zope3-Users] list woes
Marco Mariani
marco at sferacarta.com
Thu Jun 15 04:49:48 EDT 2006
Bernd Dorn wrote:
> you reassign the attribute here, so the list is never persistent
I thought about that, it's python 101 after all
> in Person.__init__ do: self.gadgets=PersistentList()
>
> and then in growup:
>
> person.gadgets.extend([ Gadget(toy) for toy in baby.toys ])
Yes, indeed, what I tried was
person.gadgets = PersistentList()
for toy in baby.toys:
person.gadgets.append(Gadget(toy))
Anyway, I am reassured by the fact that it should "just work", so I'm
trying again instead of refactoring. Must be something stoopid I overlooked.
tnx
More information about the Zope3-users
mailing list