[Zope] How can a method know if it was acquired?
Itai Tavor
itai@iinet.net.au
Mon, 7 Jul 2003 20:00:52 +1000
Hi,
I got a folderish python product with the following method:
def SKU(self):
""" Return our SKU for the catalog """
return self.sku
The problem is that when objects contained in instances of this product
are cataloged, they acquire the SKU method, so they also get the sku
property. That is bad. So what I need is something like this:
def SKU(self):
""" Return our SKU for the catalog """
if (I was acquired):
return None
else:
return self.sku
But I can't figure out how to do that. Help?
TIA, Itai
Itai Tavor "Je sautille, donc je suis."
itai@iinet.net.au - Kermit the Frog
-- "Supposing a tree fell down, Pooh, when we were underneath it?"
-- "Supposing it didn't," said Pooh after careful thought.