MCPcopy Create free account
hub / github.com/cdgriffith/Box / float

Method float

box/config_box.py:271–285  ·  view source on GitHub ↗

Return value of key as a float :param item: key of value to transform :param default: value to return if item does not exist :return: float of value

(self, item, default=None)

Source from the content-addressed store, hash-verified

269 return int(item)
270
271 def float(self, item, default=None):
272 """
273 Return value of key as a float
274
275 :param item: key of value to transform
276 :param default: value to return if item does not exist
277 :return: float of value
278 """
279 try:
280 item = self.__getattr__(item)
281 except AttributeError as err:
282 if default is not None:
283 return default
284 raise err
285 return float(item)
286
287 def list(self, item, default=None, spliter: str = ",", strip=True, mod=None):
288 """

Callers 2

getfloatMethod · 0.95
test_config_boxMethod · 0.80

Calls 1

__getattr__Method · 0.80

Tested by 1

test_config_boxMethod · 0.64