whatspop
A log of things made by Kunal Anand
Data visualization, interface design, programming, music, and art

Link

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.

December 18, 2007


 
Content and layout by Kunal Anand. Connect with me on Twitter, Facebook, or email.
My views/opinions expressed here in no way reflect those of my employer.