List methods that handle predicates in Python »

PredicateList extends UserList (this is found under your Python installation's lib/), which happens to be a Python wrapper for the list type. Everything should be straight-forward. I am however a bit embarrassed by catching the AttributeError exception; there is certainly a better way of accomplishing that - one way that comes to mind is to do a type check prior to grabbing the property value.

Posted on December 18, 2007. Permanent link.