Skip to content

Commit fd9a8bf

Browse files
committed
PYTHON-3033 Fix typo in uuid docs (#808)
(cherry picked from commit 44853ea)
1 parent d715f58 commit fd9a8bf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/examples/uuid.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
.. _handling-uuid-data-example:
23

34
Handling UUID Data
@@ -12,7 +13,7 @@ to MongoDB and retrieve them as native :class:`uuid.UUID` objects::
1213
from uuid import uuid4
1314

1415
# use the 'standard' representation for cross-language compatibility.
15-
client = MongoClient(uuid_representation=UuidRepresentation.STANDARD)
16+
client = MongoClient(uuidRepresentation='standard')
1617
collection = client.get_database('uuid_db').get_collection('uuid_coll')
1718

1819
# remove all documents from collection

pymongo/mongo_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ def __init__(
325325
speed. 9 is best compression. Defaults to -1.
326326
- `uuidRepresentation`: The BSON representation to use when encoding
327327
from and decoding to instances of :class:`~uuid.UUID`. Valid
328-
values are `pythonLegacy`, `javaLegacy`, `csharpLegacy`, `standard`
329-
and `unspecified` (the default). New applications
330-
should consider setting this to `standard` for cross language
328+
values are the strings: "standard", "pythonLegacy", "javaLegacy",
329+
"csharpLegacy", and "unspecified" (the default). New applications
330+
should consider setting this to "standard" for cross language
331331
compatibility. See :ref:`handling-uuid-data-example` for details.
332332
- `unicode_decode_error_handler`: The error handler to apply when
333333
a Unicode-related error occurs during BSON decoding that would

0 commit comments

Comments
 (0)