Skip to content

Commit 32a7513

Browse files
committed
fix: remove invalid dunder methods
Accidentally included python2 dunder methods that are no longer part of python3. For example, __irpow__ no longer exists, and instead only __ipow__ is used.
1 parent 5ec8ac7 commit 32a7513

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

DynamicVector/DynamicVector.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,54 +1517,30 @@ def __itruediv__(self, other): # To get called on true division with assignment
15171517
self._data[: self._size] /= other
15181518
return self
15191519

1520-
def __irtruediv__(self, other): # To get called on true division with assignment e.g. a /=b.
1521-
if isinstance(other, DynamicVector):
1522-
other = other.view
1523-
self._data[: self._size] /= other
1524-
return self
1525-
15261520
def __ifloordiv__(self, other): # To get called on integer division with assignment e.g. a //=b.
15271521
if isinstance(other, DynamicVector):
15281522
other = other.view
15291523
self._data[: self._size] //= other
15301524
return self
15311525

1532-
def __irfloordiv__(self, other): # To get called on integer division with assignment e.g. a //=b.
1533-
if isinstance(other, DynamicVector):
1534-
other = other.view
1535-
self._data[: self._size] //= other
1536-
return self
1537-
15381526
def __imod__(self, other): # To get called on modulo with assignment e.g. a%=b.
15391527
if isinstance(other, DynamicVector):
15401528
other = other.view
15411529
self._data[: self._size] %= other
15421530
return self
15431531

1544-
def __irmod__(self, other): # To get called on modulo with assignment e.g. a%=b.
1545-
if isinstance(other, DynamicVector):
1546-
other = other.view
1547-
self._data[: self._size] %= other
1548-
return self
1549-
15501532
def __ipow__(self, other): # To get called on exponents with assignment e.g. a **=b.
15511533
if isinstance(other, DynamicVector):
15521534
other = other.view
15531535
self._data[: self._size] **= other
15541536
return self
15551537

1556-
def __irpow__(self, other): # To get called on exponents with assignment e.g. a **=b.
1557-
if isinstance(other, DynamicVector):
1558-
other = other.view
1559-
self._data[: self._size] **= other
1560-
return self
1561-
1562-
def __int__(self): # To get called by built-int int() method to convert a type to an int.
1538+
def __int__(self): # To get called by built-in int() method to convert a type to an int.
15631539
res = DynamicVector(int, self._cap)
15641540
res.extend(self.view)
15651541
return res
15661542

1567-
def __float__(self): # To get called by built-int float() method to convert a type to float.
1543+
def __float__(self): # To get called by built-in float() method to convert a type to float.
15681544
res = DynamicVector(float, self._cap)
15691545
res.extend(self.view)
15701546
return res

0 commit comments

Comments
 (0)