diff --git a/examples/units/basic_units.py b/examples/units/basic_units.py index 2469882ff159..f8425f1ec45c 100644 --- a/examples/units/basic_units.py +++ b/examples/units/basic_units.py @@ -123,11 +123,11 @@ def __new__(cls, value, unit): {}) if subcls not in units.registry: units.registry[subcls] = basicConverter - return object.__new__(subcls, value, unit) + return object.__new__(subcls) except TypeError: if cls not in units.registry: units.registry[cls] = basicConverter - return object.__new__(cls, value, unit) + return object.__new__(cls) def __init__(self, value, unit): self.value = value @@ -311,7 +311,7 @@ def rad_fn(x, pos=None): elif n == 2: return r'$\pi$' elif n % 2 == 0: - return r'$%s\pi$' % (n/2,) + return r'$%s\pi$' % (n//2,) else: return r'$%s\pi/2$' % (n,)