![]() |
Belle II Software
release-08-02-04
|
Public Member Functions | |
| def | __init__ (self, field_name, conversion=None, format_spec=None) |
| def | __getattr__ (self, attr) |
| def | __getitem__ (self, attr) |
| def | compose (self) |
Public Attributes | |
| field_name | |
| cached value of the field name | |
| conversion | |
| cached value of the conversion specifier | |
| 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.
| def __init__ | ( | self, | |
| field_name, | |||
conversion = None, |
|||
format_spec = None |
|||
| ) |
Constructor
Definition at line 36 of file tolerate_missing_key_formatter.py.
| def __getattr__ | ( | self, | |
| attr | |||
| ) |
Record attribute lookup
Definition at line 46 of file tolerate_missing_key_formatter.py.
| def __getitem__ | ( | self, | |
| attr | |||
| ) |
Record item lookup
Definition at line 50 of file tolerate_missing_key_formatter.py.
| def 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.