[Dev] item collection decisions

Brendan O'Connor brendano at osafoundation.org
Fri Jul 1 11:09:46 PDT 2005


On Thu, 30 Jun 2005 23:24:19 -0700, Ted Leung <twl at osafoundation.org>  
wrote:
> A Query is a predicate applied to a Set/Collection of items.   In the
> new world, you will be able to apply predicates to any collection of
> item.  At the moment this  happens via a FilteredCollection kind
> which accepts the predicate as an argument.   Right now my intention
> is to support the predicate language from the existing Query
> implemenatation.  I have a feeling the Phillip may be interested in
> something more Pythonic, which may also be a possiblity.   Concretely:
>
> c = UserCollection(.....)
> fc = FilteredCollection(c, "i.startDate < '3/3/2005 03:15'")

An interesting approach to a python-ic query language is to use actual  
Python objects and operator overloading... it's interesting to see how  
SQLBuilder does it: http://sqlobject.org/docs/SQLBuilder.html

problem is, python doesn't seem to have the complete flexibility needed  
(unlike say Lisp)

Brendan


More information about the Dev mailing list