Skip to content

Commit

Permalink
Updated IFDRational operators (#38)
Browse files Browse the repository at this point in the history
Updated IFDRational operators
  • Loading branch information
hugovk committed Oct 7, 2019
2 parents 8280943 + 8878910 commit adcd832
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ def delegate(self, *args):

return delegate

""" a = ['add','radd', 'sub', 'rsub','div', 'rdiv', 'mul', 'rmul',
'truediv', 'rtruediv', 'floordiv',
'rfloordiv','mod','rmod', 'pow','rpow', 'pos', 'neg',
'abs', 'trunc', 'lt', 'gt', 'le', 'ge', 'nonzero',
""" a = ['add','radd', 'sub', 'rsub', 'mul', 'rmul',
'truediv', 'rtruediv', 'floordiv', 'rfloordiv',
'mod','rmod', 'pow','rpow', 'pos', 'neg',
'abs', 'trunc', 'lt', 'gt', 'le', 'ge', 'bool',
'ceil', 'floor', 'round']
print("\n".join("__%s__ = _delegate('__%s__')" % (s,s) for s in a))
"""
Expand All @@ -370,8 +370,6 @@ def delegate(self, *args):
__radd__ = _delegate("__radd__")
__sub__ = _delegate("__sub__")
__rsub__ = _delegate("__rsub__")
__div__ = _delegate("__div__")
__rdiv__ = _delegate("__rdiv__")
__mul__ = _delegate("__mul__")
__rmul__ = _delegate("__rmul__")
__truediv__ = _delegate("__truediv__")
Expand All @@ -390,7 +388,7 @@ def delegate(self, *args):
__gt__ = _delegate("__gt__")
__le__ = _delegate("__le__")
__ge__ = _delegate("__ge__")
__nonzero__ = _delegate("__nonzero__")
__bool__ = _delegate("__bool__")
__ceil__ = _delegate("__ceil__")
__floor__ = _delegate("__floor__")
__round__ = _delegate("__round__")
Expand Down

0 comments on commit adcd832

Please sign in to comment.