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

Method float

box/config_box.py:302–316  ·  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

300 return int(item)
301
302 def float(self, item, default=None):
303 """
304 Return value of key as a float
305
306 :param item: key of value to transform
307 :param default: value to return if item does not exist
308 :return: float of value
309 """
310 try:
311 item = self.__getattr__(item)
312 except AttributeError as err:
313 if default is not None:
314 return default
315 raise err
316 return float(item)
317
318 def list(self, item, default=None, spliter: str = ",", strip=True, mod=None):
319 """

Callers 2

getfloatMethod · 0.95
test_config_boxMethod · 0.80

Calls 1

__getattr__Method · 0.80

Tested by 1

test_config_boxMethod · 0.64