micropython

Changeset

436:26002b8d2dce
2011-06-26 Paul Boddie raw files shortlog changelog graph Removed redundant attributes.
micropython/common.py (file)
     1.1 --- a/micropython/common.py	Sun Jun 26 14:15:57 2011 +0200
     1.2 +++ b/micropython/common.py	Sun Jun 26 17:01:29 2011 +0200
     1.3 @@ -371,55 +371,6 @@
     1.4  
     1.5  # Useful data.
     1.6  
     1.7 -comparison_methods = {
     1.8 -    "==" : ("__eq__", "__eq__"),
     1.9 -    "!=" : ("__ne__", "__ne__"),
    1.10 -    "<" : ("__lt__", "__gt__"),
    1.11 -    "<=" : ("__le__", "__ge__"),
    1.12 -    ">=" : ("__ge__", "__le__"),
    1.13 -    ">" : ("__gt__", "__lt__"),
    1.14 -    "is" : None,
    1.15 -    "is not" : None,
    1.16 -    "in" : None,
    1.17 -    "not in" : None
    1.18 -    }
    1.19 -
    1.20 -augassign_methods = {
    1.21 -    "+=" : ("__iadd__", ("__add__", "__radd__")),
    1.22 -    "-=" : ("__isub__", ("__sub__", "__rsub__")),
    1.23 -    "*=" : ("__imul__", ("__mul__", "__rmul__")),
    1.24 -    "/=" : ("__idiv__", ("__div__", "__rdiv__")),
    1.25 -    "//=" : ("__ifloordiv__", ("__floordiv__", "__rfloordiv__")),
    1.26 -    "%=" : ("__imod__", ("__mod__", "__rmod__")),
    1.27 -    "**=" : ("__ipow__", ("__pow__", "__rpow__")),
    1.28 -    "<<=" : ("__ilshift__", ("__lshift__", "__rlshift__")),
    1.29 -    ">>=" : ("__irshift__", ("__rshift__", "__rrshift__")),
    1.30 -    "&=" : ("__iand__", ("__and__", "__rand__")),
    1.31 -    "^=" : ("__ixor__", ("__xor__", "__rxor__")),
    1.32 -    "|=" : ("__ior__", ("__or__", "__ror__"))
    1.33 -    }
    1.34 -
    1.35 -binary_methods = {
    1.36 -    "Add" : ("__add__", "__radd__"),
    1.37 -    "Bitand" : ("__and__", "__rand__"),
    1.38 -    "Bitor" : ("__or__", "__ror__"),
    1.39 -    "Bitxor" : ("__xor__", "__rxor__"),
    1.40 -    "Div" : ("__div__", "__rdiv__"),
    1.41 -    "FloorDiv" : ("__floordiv__", "__rfloordiv__"),
    1.42 -    "LeftShift" : ("__lshift__", "__rlshift__"),
    1.43 -    "Mod" : ("__mod__", "__rmod__"),
    1.44 -    "Mul" : ("__mul__", "__rmul__"),
    1.45 -    "Power" : ("__pow__", "__rpow__"),
    1.46 -    "RightShift" : ("__rshift__", "__rrshift__"),
    1.47 -    "Sub" : ("__sub__", "__rsub__")
    1.48 -    }
    1.49 -
    1.50 -unary_methods = {
    1.51 -    "Invert" : "__invert__",
    1.52 -    "UnaryAdd" : "__pos__",
    1.53 -    "UnarySub" : "__neg__"
    1.54 -    }
    1.55 -
    1.56  operator_functions = {
    1.57  
    1.58      # Binary operations.