How to test if one dict is subset of another?

Paul Rubin http
Tue Feb 20 12:18:37 EST 2007


"Jay Tee" <jeff.templon at gmail.com> writes:
> it looks very cool, except that one of the constraints mentioned is
> that the solution has to work properly on pythons 2.2 and 2.3.

That thing doesn't really deeply depend on defaultdict, it's just
convenient.  You can add a few more lines of code in the preprocessing
step to get around it.

> Thanks ... I took the previous poster's suggestion (had also been
> suggested earlier) and built cached versions of the job lists, indexed
> on common queries, while building the master job list.

You can also cache queries with the scheme I suggested, and it lets
you make the cached lists for new queries quickly.



More information about the Python-list mailing list