Skip to content

Commit e32d1b8

Browse files
committed
Addressed comments in docstrings.
1 parent 3d36aa9 commit e32d1b8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

bson/binary.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,13 @@ class UuidRepresentation:
209209
class BinaryVectorDtype(Enum):
210210
"""Datatypes of vector subtype.
211211
212+
FLOAT32: Pack floats as float32
213+
INT8: Pack ints in [-128, 127] as signed int8
214+
PACKED_BIT: Pack ints in [0, 255] as unsigned uint8
215+
212216
The PACKED_BIT value represents a special case where vector values themselves
213217
can only hold two values (0 or 1) but these are packed together into groups of 8,
214-
a byte. In Python, these are displayed as ints in range(0,128).
218+
a byte. In Python, these are displayed as ints in range [0, 255]
215219
"""
216220

217221
INT8 = b"\x03"
@@ -263,9 +267,11 @@ class Binary(bytes):
263267
<https://bsonspec.org/spec.html>`_
264268
to use
265269
266-
.. versionchanged::
267-
3.9 Support any bytes-like type that implements the buffer protocol.
268-
4.9 Addition of vector subtype.
270+
.. versionchanged:: 3.9
271+
Support any bytes-like type that implements the buffer protocol.
272+
273+
.. versionchanged:: 4.9
274+
Addition of vector subtype.
269275
"""
270276

271277
_type_marker = 5

0 commit comments

Comments
 (0)