Helper function to get an element by key from a dictionary defaulting to key=MISSING
(adict, instance=MISSING)
| 24 | |
| 25 | |
| 26 | def _dget(adict, instance=MISSING): |
| 27 | """Helper function to get an element by key |
| 28 | from a dictionary defaulting to key=MISSING |
| 29 | """ |
| 30 | |
| 31 | try: |
| 32 | return adict[instance] |
| 33 | except KeyError: |
| 34 | return adict[MISSING] |
| 35 | |
| 36 | def _dset(adict, value, instance=MISSING): |
| 37 | """Helper function to set an element by key |
no outgoing calls
no test coverage detected