Is it possible to convert the following into a lambda expression?

```
def default(o):
    if isinstance(o, (datetime.date, datetime.datetime)):
        return o.isoformat()

json.dumps(raw, default=default)

```

Something like:

```
json.dumps(raw, default=lambda o: o.isoformat() if isinstance(o, (datetime.date, datetime.datetime))...? )

```