#NEWLINE# def __init__( self , kind , title , kind_properties , contact_properties = [ ] ) : #NEWLINE# #INDENT# " Ctor.\n\n    title is the name of this particular entity, e.g. Bob Jones or Mom's\n    Birthday Party.\n\n    kind_properties is a list of property names that should be included in\n    this entity's XML encoding as first-class XML elements, instead of\n    <property> elements. 'title' and 'content' are added to kind_properties\n    automatically, and may not appear in contact_properties.\n\n    contact_properties is a list of property names that are Keys that point to\n    Contact entities, and should be included in this entity's XML encoding as\n    <gd:who> elements. If a property name is included in both kind_properties\n    and contact_properties, it is treated as a Contact property.\n\n    Args:\n    kind: string\n    title: string\n    kind_properties: list of strings\n    contact_properties: list of string\n    " #NEWLINE# datastore . Entity . __init__ ( self , kind ) #NEWLINE# if ( not isinstance ( title , types . StringTypes ) ) : #NEWLINE# #INDENT# raise datastore_errors . BadValueError ( ( 'Expected a string for title; received %s (a %s).' % ( title , datastore_types . typename ( title ) ) ) ) #NEWLINE# #UNINDENT# self [ 'title' ] = title #NEWLINE# self [ 'content' ] = '' #NEWLINE# self . _contact_properties = set ( contact_properties ) #NEWLINE# assert ( not self . _contact_properties . intersection ( self . keys ( ) ) ) #NEWLINE# self . _kind_properties = ( set ( kind_properties ) - self . _contact_properties ) #NEWLINE# self . _kind_properties . add ( 'title' ) #NEWLINE# self . _kind_properties . add ( 'content' )