![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, field_name, conversion=None, format_spec=None) | |
__getattr__ (self, attr) | |
__getitem__ (self, attr) | |
compose (self) | |
Public Attributes | |
field_name = field_name | |
cached value of the field name | |
conversion = conversion | |
cached value of the conversion specifier | |
format_spec = format_spec | |
cached value of the format specifier | |
This class serves as a placeholder for keys in not found during lookup into keyword or positional arguments during a call to TolerateMissingKeyFormatter. It records potential item and attribute lookups, conversion and format_spec to reproduce original replacement_field entry into the formatted string. Parameters ---------- field_name : str field_name part of the replacement_field specifier conversion : str conversion part of the replacement_field specifier format_spec : str% format_spec part of the replacement_field specifier Notes ----- replacement_field, field_name, conversion and format_spec have the meaning as outlined in https://docs.python.org/2/library/string.html#format-string-syntax
Definition at line 13 of file tolerate_missing_key_formatter.py.
__init__ | ( | self, | |
field_name, | |||
conversion = None, | |||
format_spec = None ) |
Constructor
Definition at line 36 of file tolerate_missing_key_formatter.py.
__getattr__ | ( | self, | |
attr ) |
Record attribute lookup
Definition at line 46 of file tolerate_missing_key_formatter.py.
__getitem__ | ( | self, | |
attr ) |
Record item lookup
Definition at line 50 of file tolerate_missing_key_formatter.py.
compose | ( | self | ) |
Compose a replacement_field string equivalent to the original replacement_field in the string formatting.
Definition at line 54 of file tolerate_missing_key_formatter.py.
conversion = conversion |
cached value of the conversion specifier
Definition at line 42 of file tolerate_missing_key_formatter.py.
field_name = field_name |
cached value of the field name
Definition at line 40 of file tolerate_missing_key_formatter.py.
format_spec = format_spec |
cached value of the format specifier
Definition at line 44 of file tolerate_missing_key_formatter.py.