1. Chris Mutel
  2. brightway2-data
  3. Issues
Issue #12 resolved

Make searching more flexible

Chris Mutel
repo owner created an issue

It would be nice to be able to do e.g.

Filter("name", "in", "foo") & Filter("unit", "is", "kilogram")


Filter("name", "in", "foo") | Filter("unit", "is", "kilogram")

This would require overriding and and or.

Also, the Result class should make it easier to see the individual dataset details.

(See http://www.rafekettler.com/magicmethods.html)

Comments (3)

  1. Chris Mutel reporter

    Maybe could implement this by creating a BaseFilter class with or and and (so that people can get & and | without being limited to Filters), and then having BaseFilter | BaseFilter return a CompoundFilter that evaluates each filtering functions and merges the results.

  2. Log in to comment