[Grok-dev] adding objects to context from __init__

Kevin Teague kevin at bud.ca
Sat Oct 4 19:12:29 EDT 2008


Well, Brandon's answer got out a little quicker than mine, but since  
this is a very common question and the distinction between class  
attributes and object attributes is easily blurred since Python will  
look for class attributes in the absence of an object attribute during  
object attribute look-up, I wrote up my explanation in documentation:

http://grok.zope.org/documentation/how-to/understanding-default-values-for-object-database/view

This explanation is still a bit verbose. Brandon, feel free to go  
through and make the important bits in **bold** text :)

It might also be nice to expand it with a discussion on properties and  
FieldProperties ... and to make the text not-so dry I could upload  
some photos taken from my excellent shoe collection ... :)

http://www.flickr.com/photos/kteague/782104678/



More information about the Grok-dev mailing list