welchbj / tt

a Pythonic toolkit for working with Boolean expressions
https://tt.brianwel.ch
MIT License
218 stars 12 forks source link

Refractoring fill function in try_table #1

Closed TApplencourt closed 6 years ago

TApplencourt commented 6 years ago

Hi,

I don't know if this pull request will be off any interest for you, but I retractor the fill function of try_table. It should be marginally quicker and arguably more maintainable.

Regards,

PS : Sadly, I didn't test my modification, so take it with a grain of salt

welchbj commented 6 years ago

Thanks for taking the time to author a potential change to the library's code.

While this refactoring could be an elegant change to the existing logic, it looks like you are not actually writing to the self._results list. I believe that your change would also need to enumerate over the _input_combos iterator, in order to keep track of the current position within the self._results list.

If you fix what I pointed out and your changes pass all of the CI tests (including the pep8 linting), I would be happy to accept your PR.