> Do you mean hasattr(obj, 'c') and isinstance(obj.c, OrderedProperties)?
> This is because SQLAlchemy objects can have any class, and simply
> checking for the existence for a "c" attribute does not suffice.

Sure.

> Another problem is that in SQLAlchemy 0.5 even the c attribute is gone.
> I solved this by checking for hasattr(obj, '_sa_class_manager') here.
>
> One idea would be to define these predicates as functions in jsonify,
> e.g. is_sqlalchemy_object, so you can reuse them in your code.

I think this makes a lot of sense.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to