Skip to content

Commit baee96b

Browse files
committed
Fix incorrect doctest output for example of deques
1 parent b3804ed commit baee96b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/structuring.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,20 @@ to deques are:
154154
- `Deque[T]`
155155
- `deque[T]`
156156

157-
In all cases, a new **unbounded** deque (`maxlen=None`) will be returned, so this operation can be used to
158-
copy an iterable into a deque.
157+
In all cases, a new **unbounded** deque (`maxlen=None`) will be returned,
158+
so this operation can be used to copy an iterable into a deque.
159159
If you want to convert into bounded `deque`, registering a custom structuring hook is a good approach.
160160

161161
```{doctest}
162162
>>> cattrs.structure((1, 2, 3), deque[int])
163-
[1, 2, 3]
163+
deque([1, 2, 3])
164164
```
165165

166166
These generic types are composable with all other converters.
167167

168168
```{doctest}
169169
>>> cattrs.structure((1, None, 3), deque[Optional[str]])
170-
['1', None, '3']
170+
deque(['1', None, '3'])
171171
```
172172

173173
```{versionadded} 23.1.0

0 commit comments

Comments
 (0)