[sqlalchemy] Re: create_instance() documentation typo?

2007-11-08 Thread Andrew Stromnov

Done.

http://www.sqlalchemy.org/trac/ticket/859

On Nov 8, 8:55 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> its a typo.  if you could place a ticket in trac (with milestone
> 0.4xx) that would be helpful.
>
> On Nov 8, 2007, at 12:31 PM, Andrew Stromnov wrote:
>
>
>
> > Athttp://www.sqlalchemy.org/docs/04/sqlalchemy_orm.html#docstrings_sqla...
> > :
>
> > """
> > def create_instance(self, mapper, selectcontext, row, class_)
>
> > Receive a row when a new object instance is about to be created from
> > that row.
>
> > The method can choose to create the instance itself, or it can return
> > None to indicate normal object creation should take place.
>
> > 
>
> > but in code no 'None' value accepted (mapper.py line 1414):
> > """
> ># plugin point
> >if 'create_instance' in extension.methods:
> >instance = extension.create_instance(self, context,
> > row, self.class_)
> >if instance is EXT_CONTINUE:
> >instance =
> > attribute_manager.new_instance(self.class_)
> >else:
> >instance = attribute_manager.new_instance(self.class_)
>
> >instance._entity_name = self.entity_name
> > 
>
> > if extension.create_instance() produces None, then last string should
> > raise AttributeError exception


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: create_instance() documentation typo?

2007-11-08 Thread Michael Bayer

its a typo.  if you could place a ticket in trac (with milestone  
0.4xx) that would be helpful.

On Nov 8, 2007, at 12:31 PM, Andrew Stromnov wrote:

>
> At 
> http://www.sqlalchemy.org/docs/04/sqlalchemy_orm.html#docstrings_sqlalchemy.orm_MapperExtension
> :
>
> """
> def create_instance(self, mapper, selectcontext, row, class_)
>
> Receive a row when a new object instance is about to be created from
> that row.
>
> The method can choose to create the instance itself, or it can return
> None to indicate normal object creation should take place.
>
> 
>
> but in code no 'None' value accepted (mapper.py line 1414):
> """
># plugin point
>if 'create_instance' in extension.methods:
>instance = extension.create_instance(self, context,
> row, self.class_)
>if instance is EXT_CONTINUE:
>instance =
> attribute_manager.new_instance(self.class_)
>else:
>instance = attribute_manager.new_instance(self.class_)
>
>instance._entity_name = self.entity_name
> 
>
> if extension.create_instance() produces None, then last string should
> raise AttributeError exception
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---