Skip to content

Commit

Permalink
fix unit examples under python3
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Dec 30, 2014
1 parent c8ed7ba commit 5b8e4bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/units/basic_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b8e4bb

Please sign in to comment.