if instance in session:
do something
else:
do something else
alternatively, you can explicitly say
elif instance in session.new:
On Dec 27, 2008, at 4:35 AM, Chen Houwu wrote:
>
> I want to do as following:
>
> if instance is Transient:
> do something
> else instance is Pending:
> do something else
>
> How can I accomplish it?
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---