Skip to content

Commit 5fd0f5b

Browse files
committed
Let's not stick in the past
1 parent 1d72dcc commit 5fd0f5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/why.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Finally, here's a much more complex example, involving _attrs_ classes where _ca
4949

5050
```python
5151
>>> from enum import unique, Enum
52-
>>> from typing import Optional, Sequence, Union
52+
>>> from typing import Sequence
5353
>>> from cattrs import structure, unstructure
5454
>>> from attrs import define, field
5555

@@ -79,7 +79,7 @@ Finally, here's a much more complex example, involving _attrs_ classes where _ca
7979

8080
>>> p
8181
[{'cuteness': 1, 'chip': {'chip_id': 1, 'time_chipped': 10.0}}, {'breed': 'maine_coon', 'names': ['Fluffly', 'Fluffer']}]
82-
>>> structure(p, list[Union[Dog, Cat]])
82+
>>> structure(p, list[Dog | Cat])
8383
[Dog(cuteness=1, chip=DogMicrochip(chip_id=1, time_chipped=10.0)), Cat(breed=<CatBreed.MAINE_COON: 'maine_coon'>, names=['Fluffly', 'Fluffer'])]
8484

8585
```

0 commit comments

Comments
 (0)