open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Fix a different in interface between NTParameterSet and the other ParameterSet classes #372

Open apdavison opened 7 years ago

apdavison commented 7 years ago

NTParameterSet inherits from dict, and so ps.values is a function. In the other classes, ps.values was a dictionary. Here I've renamed ps.values to ps._values, and implemented ps.items() to match the behaviour of dict.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.01%) to 71.519% when pulling c930d3c490f9fee91543d7b7a0692e4bf0a551f1 on apdavison:fix-parameters into d5cc713574dc92c03fff1ddceca776cb4320fa5a on open-research:master.

babsey commented 7 years ago

I reviewed this PR and it is a good idea to rename ps.values to ps._values. But ps.items might be not necessary, because ps.as_dict appears a similar method to ps.items.