MCPcopy Create free account
hub / github.com/PageBot/PageBot / __repr__

Method __repr__

Lib/pagebot/toolbox/units.py:1407–1411  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1405 inch = property(_get_inch)
1406
1407 def __repr__(self):
1408 v = asIntOrFloat(self.v)
1409 if isinstance(v, int):
1410 return '%d%s' % (v, self.UNITC)
1411 return '%0.2f%s' % (v, self.UNITC)
1412
1413class Formula(Unit):
1414 """Unit class that contains a sequence of other units and rules how to

Callers

nothing calls this directly

Calls 1

asIntOrFloatFunction · 0.90

Tested by

no test coverage detected