Skip to content

Commit c65d434

Browse files
committed
Clarify that the Headers class is a Sequence
This is both in the docs (via the changelog) and by inheriting from the Sequence ABC.
1 parent 889a564 commit c65d434

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

h11/_headers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
from collections.abc import Sequence
23

34
from ._abnf import field_name, field_value
45
from ._util import bytesify, LocalProtocolError, validate
@@ -62,7 +63,7 @@
6263
_field_value_re = re.compile(field_value.encode("ascii"))
6364

6465

65-
class Headers:
66+
class Headers(Sequence):
6667
"""
6768
A list-like interface that allows iterating over headers as byte-pairs
6869
of (lowercased-name, value).

0 commit comments

Comments
 (0)