Using a loop and checking if we're on the last iteration seems icky. Why not split oname up into `oname_head`, `oname_rest` and `oname_tail`, leave the loop as it is, and do the last bit outside the loop:

```python
obj = self._getattr_property(obj, oname_tail)
```