File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,11 @@ class ExtensionOpsMixin(object):
634
634
"""
635
635
A base class for linking the operators to their dunder names
636
636
"""
637
+
638
+ @classmethod
639
+ def _create_arithmetic_method (cls , op ):
640
+ raise AbstractMethodError (cls )
641
+
637
642
@classmethod
638
643
def _add_arithmetic_ops (cls ):
639
644
cls .__add__ = cls ._create_arithmetic_method (operator .add )
@@ -657,6 +662,10 @@ def _add_arithmetic_ops(cls):
657
662
cls .__divmod__ = cls ._create_arithmetic_method (divmod )
658
663
cls .__rdivmod__ = cls ._create_arithmetic_method (ops .rdivmod )
659
664
665
+ @classmethod
666
+ def _create_comparison_method (cls , op ):
667
+ raise AbstractMethodError (cls )
668
+
660
669
@classmethod
661
670
def _add_comparison_ops (cls ):
662
671
cls .__eq__ = cls ._create_comparison_method (operator .eq )
You can’t perform that action at this time.
0 commit comments