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
[EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to