Closed sunlightlabs closed 15 years ago
this definitely comes from PVS itself, though it should be trivial to have the code remove duplicates
actually they aren't quite duplicates:
>>> a,b = votesmart.officials.getByDistrict(21511)
>>> a == b
False
in this particular example the official is in both the Democratic and Working families party.
The recommended solution is to gather the attributes you need to be unique and use python's built in set()
to make your results unique. Having the library throw away data introduces potential errors (eg. what if two lawmakers have the same name?)
this issue is now addressed in the documentation
When querying for officials using votesmart.officials.getByDistrict, every official returned is duplicated twice.