[storm] Infoheritance question

Jeremy Fishman jfishman at bowdoin.edu
Fri Jan 23 05:33:07 GMT 2009


Hi,
I have a slightly modified use of the infoheritance pattern in an 
application I am writing.  It seems to be working as I expected, though 
its implementation does not follow the normal pattern exactly.  I was 
wondering if there are any potential errors I missed or performance 
issues I might encounter later, or with more advanced test cases, that 
someone with experience can see now.  Or if your opinion is it's not as 
elegant as the normal approach.

A little explanation: the base class here is used as a universal 
reference.  The application needs to be able to receive reference 
information and retrieve the corresponding object from the database, 
regardless of its type.  You can pretty much ignore the external SHA 
stuff; it's just important that each object has a unique SHA-1 hash.

Thanks a bunch for any help,
Jeremy


The output of the simple tests are

Barack: 558a41bb44479236cd60c331f2b5b584bdd0fcec
Ann: 413864193855201046def1b763bdfe74468d8d5f
Found Barack Obama: id=558a41bb44479236cd60c331f2b5b584bdd0fcec
Found Ann Dunham Soetoro: id=413864193855201046def1b763bdfe74468d8d5f
Ann's children: ['Barack Obama']
Barack's parents: ['Ann Dunham Soetoro']
rbarack == rbarack.ref.object? -> True
rbarack is rbarack.ref.object? -> True
rbarack == rbarack2? -> True
rbarack is rbarack2? -> False
rbarack == rbarack3? -> True
rbarack is rbarack3? -> True

which is exactly what I expected.  Anything unforeseen?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: question.py
Type: text/x-python
Size: 4928 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/storm/attachments/20090123/08f1120d/attachment.py 


More information about the storm mailing list