similar to python's dictionary get method, return field of item if found (i.e. self.item is valid) or otherwise return default_value it's a syntax suger of python's builtin getattr method
(self, item, default_value)
| 532 | return field |
| 533 | |
| 534 | def get(self, item, default_value): |
| 535 | """ |
| 536 | similar to python's dictionary get method, return field of item if found |
| 537 | (i.e. self.item is valid) or otherwise return default_value |
| 538 | |
| 539 | it's a syntax suger of python's builtin getattr method |
| 540 | """ |
| 541 | return getattr(self, item, default_value) |
| 542 | |
| 543 | def __getattr__(self, item): |
| 544 | if item.startswith('__'): |
no outgoing calls