Join Nostr
2025-10-02 22:17:00 UTC
in reply to

Fabio Manganiello on Nostr: well you have `getattr(obj, key, default)` that can achieve something similar, ...

well you have `getattr(obj, key, default)` that can achieve something similar, although not through JavaScript's or Kotlin's compact chains:

```
reason = None
while not reason:
reason = getattr(e, 'reason', None)
if not reason:
e = e.__context__
```