[Grok-dev] grok_overview.html: issue with adapters

Roger Erens roger at erens-krekels.net
Tue Nov 4 09:08:34 EST 2008


In the code example following
'We can now call sized for a content object and get an object back that 
implements the “sized API”:'

we have currently:

s = sized(my_content_object)
print s.size()

but size() is not defined in the code above. It seems to me that either 
the second line should read:

print s.sized()

But it looks silly to me to use 'sized' twice. So, in the code fragment 
above, the method definitions in the three classes would better be 
refactored from sized(self) to size(self)?

Cheers,

Roger


More information about the Grok-dev mailing list