Ben Finney wrote: > New condition tests > ------------------- > > def assert_less_than(first, second, msg=None): > op = operator.lt > self.assert_compare_true(op, first, second, msg) > > def assert_greater_than(first, second, msg=None): > op = operator.gt > self.assert_compare_true(op, first, second, msg) > > def assert_less_than_or_equal(first, second, msg=None): > op = operator.le > self.assert_compare_true(op, first, second, msg) > > def assert_greater_than_or_equal(first, second, msg=None): > op = operator.ge > self.assert_compare_true(op, first, second, msg) > > The following test methods are also added. Their implementation in > each case is simply the logical inverse of a corresponding method > above. > > def assert_not_less_than(first, second, msg=None) > # Logical inverse of assert_less_than > > def assert_not_greater_than(first, second, msg=None) > # Logical inverse of assert_greater_than > > def assert_not_less_than_or_equal(first, second, msg=None) > # Logical inverse of assert_less_than_or_equal > > def assert_not_greater_than_or_equal(first, second, msg=None) > # Logical inverse of assert_greater_than_or_equal Why?! Your other PEP is about removing redundant names, and here you have introduced 4 of them: assert_not_less_than = assert_greater_than_or_equal assert_not_greater_than = assert_less_than_or_equal assert_not_less_than_or_equal = assert_greater_than assert_not_greater_than_or_equal = assert_less_than Besides, ``assert_not_greater_than_or_equal`` is god-awful-long, along with the complaints about PEP-8-ifying. I wonder if it would be better to abbreviate these names with the *same name* that was used for the attribute in the operator module. Let's not reinvent the wheel here.. -- Scott Dial scott at scottdial.com scodial at cs.indiana.edu
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4