1 | 56a57,58
|
---|
2 | >
|
---|
3 | > to_number = float
|
---|
4 | 68c70
|
---|
5 | < setattr(self, self.STANDARD_UNIT, value)
|
---|
6 | ---
|
---|
7 | > setattr(self, self.STANDARD_UNIT, self.to_number(value))
|
---|
8 | 71c73
|
---|
9 | <
|
---|
10 | ---
|
---|
11 | >
|
---|
12 | 74c76
|
---|
13 | < return self.standard / self.UNITS[name]
|
---|
14 | ---
|
---|
15 | > return self.standard / self.to_number(self.UNITS[name])
|
---|
16 | 132c134
|
---|
17 | < **{self.STANDARD_UNIT: (self.standard * other)})
|
---|
18 | ---
|
---|
19 | > **{self.STANDARD_UNIT: (self.standard * self.to_number(other))})
|
---|
20 | 138c140
|
---|
21 | < self.standard *= float(other)
|
---|
22 | ---
|
---|
23 | > self.standard *= self.to_number(other)
|
---|
24 | 144c146
|
---|
25 | < return self * other
|
---|
26 | ---
|
---|
27 | > return self * self.to_number(other)
|
---|
28 | 151c153
|
---|
29 | < **{self.STANDARD_UNIT: (self.standard / other)})
|
---|
30 | ---
|
---|
31 | > **{self.STANDARD_UNIT: (self.standard / self.to_number(other))})
|
---|
32 | 160c162
|
---|
33 | < self.standard /= float(other)
|
---|
34 | ---
|
---|
35 | > self.standard /= self.to_number(other)
|
---|
36 | 303c305
|
---|
37 | < **{self.STANDARD_UNIT: (self.standard * other)})
|
---|
38 | ---
|
---|
39 | > **{self.STANDARD_UNIT: (self.standard * self.to_number(other))})
|
---|
40 | 320c322
|
---|
41 | < **{self.STANDARD_UNIT: (self.standard / other)})
|
---|
42 | ---
|
---|
43 | > **{self.STANDARD_UNIT: (self.standard / self.to_number(other))})
|
---|