On 5/15/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> speed wise, this is better: hasattr is implemented as getattr + try
> except. i would do it even:
>  f = getattr(instance, "_pre_insert", None)
>  if f: f()
> Thus the func name is spelled only once - avoids stupid mistakes.

Good point...

Thanks,

Roger

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to