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

Method _get_inch

Lib/pagebot/toolbox/units.py:1532–1543  ·  view source on GitHub ↗

Answers the rendered value in inch. >>> fr(2, base='4"').inch 2 >>> fr(2, base=inch(10)).inch 5 >>> units('25%', base=inch(10)).inch 2.5

(self)

Source from the content-addressed store, hash-verified

1530 p = property(_get_p)
1531
1532 def _get_inch(self):
1533 """Answers the rendered value in inch.
1534
1535 >>> fr(2, base='4"').inch
1536 2
1537 >>> fr(2, base=inch(10)).inch
1538 5
1539 >>> units('25%', base=inch(10)).inch
1540 2.5
1541 """
1542 # Renders value and factors it to mm.
1543 return asIntOrFloat(inch(self.ru).rv)
1544 inch = property(_get_inch)
1545
1546 def _get_base(self):

Callers

nothing calls this directly

Calls 2

asIntOrFloatFunction · 0.90
inchFunction · 0.85

Tested by

no test coverage detected