l.a.b.t.NumberFormatterAPI : class documentation

Part of lp.app.browser.tales View In Hierarchy

Adapter for converting numbers to formatted strings.
Method __init__ Undocumented
Method traverse Undocumented
Method intcomma Return this number with its thousands separated by comma.
Method bytes Render number as byte contractions according to IEC60027-2.
Method float Use like tal:content="context/foo/fmt:float/.2".
def __init__(self, number):
Undocumented
def traverse(self, name, furtherPath):
Undocumented
def intcomma(self):
Return this number with its thousands separated by comma.

This can only be used for integers.

def bytes(self):
Render number as byte contractions according to IEC60027-2.
def float(self, format):
Use like tal:content="context/foo/fmt:float/.2".

Will return a string formatted to the specification provided in the manner Python "%f" formatter works. See http://docs.python.org/lib/typesseq-strings.html for details and doc.displaying-numbers for various examples.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.