That's the section that is incomplete. It says that it ignores attributes that begin with _, but it doesn't - it uses them in certain circumstances for its own purposes.
On Oct 10, 1:45 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote: > Hi Andy, > > The information on disallowed property names is > here:http://code.google.com/appengine/docs/datastore/modelclass.html#Disal... > > "The datastore reserves all property names that begin and end with two > underscores (__*__). A datastore entity cannot have a property with such a > name. > > The Python model API ignores all attributes on a > Model<http://code.google.com/appengine/docs/datastore/modelclass.html#Model>or > Expando > <http://code.google.com/appengine/docs/datastore/expandoclass.html>that > begin with an underscore ( > _). Your application can use these attributes to associate data with the > model objects that is not saved to the datastore." > -Marzia > > > > On Fri, Oct 10, 2008 at 1:15 PM, Andy Freeman <[EMAIL PROTECTED]> wrote: > > > class A(db.Model): > > x = db.StringProperty(default='hi') > > def __init__(self, *args, **kwds): > > self._x = 'yes' > > super(A, self,).__init__(*args, **kwds) > > > a = A() > > > There's nothing in the documentation that suggests a connection > > between A's property x and the instance variable _x, but the db.Model > > and property implementation uses _x to store values for x. > > > This should be documented. (Of course, it isn't actually necessary - > > an instance's property data could have been stored in a single > > instance-specific structure with a documented name, but ....)- Hide quoted > > text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---