UtilitiesPython2/pep8.py

changeset 2866
c77e08c38a5c
parent 2864
d973dab8b715
child 2899
88d2458a4739
equal deleted inserted replaced
2864:d973dab8b715 2866:c77e08c38a5c
954 if inst and isidentifier(inst) and inst not in SINGLETONS: 954 if inst and isidentifier(inst) and inst not in SINGLETONS:
955 return # Allow comparison for types which are not obvious 955 return # Allow comparison for types which are not obvious
956 yield match.start(), "E721" 956 yield match.start(), "E721"
957 957
958 958
959 def python_3000_has_key(logical_line):
959 r""" 960 r"""
960 The {}.has_key() method is removed in the Python 3. 961 The {}.has_key() method is removed in the Python 3.
961 Use the 'in' operation instead. 962 Use the 'in' operation instead.
962 963
963 Okay: if "alph" in d:\n print d["alph"] 964 Okay: if "alph" in d:\n print d["alph"]

eric ide

mercurial