[docs] Doc: remove errors about mixed-type comparisons. (issue 12067)

vadmium+py at gmail.com vadmium+py at gmail.com
Wed Oct 15 02:15:54 CEST 2014


Patch v11 looks pretty good I think


http://bugs.python.org/review/12067/diff/13054/Lib/test/test_compare.py
File Lib/test/test_compare.py (right):

http://bugs.python.org/review/12067/diff/13054/Lib/test/test_compare.py#newcode100
Lib/test/test_compare.py:100: class Class_none(object):
I guess Jim is suggesting to factor out your own base class, maybe like:

class ProxyCompare:
    def __init__(self, x=None): ...
    def __str__(self): ...
class Class_none(ProxyCompare):
    meth = ()
class Class_eq(ProxyCompare):
    meth = ("eq",)
    def __eq__(self, other): ...

http://bugs.python.org/review/12067/


More information about the docs mailing list