An alternative approach is `rsplit`:

```python
try:
    parent_key, __ = key.rsplit('.', 1)
    return self[parent_key]
except ValueError:
    return 
```

But arguably, if you try to get the parent element of a "root" element it's maybe weird to get a value `None` back. Perhaps it should raise an exception instead. Otherwise you mind be fooling yourself if you're using the dict wrong. What do you think?