Access an attribute and return its value if exists. Otherwise return default.
(self, key, default=None)
| 168 | return self |
| 169 | |
| 170 | def get(self, key, default=None): |
| 171 | """ |
| 172 | Access an attribute and return its value if exists. |
| 173 | Otherwise return default. |
| 174 | """ |
| 175 | try: |
| 176 | return getattr(self, key) |
| 177 | except AttributeError: |
| 178 | return default |
| 179 | |
| 180 | |
| 181 | class _MetadataCatalog(UserDict): |
no outgoing calls