Skip to content

Commit 6a39f65

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

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
@@ -342,9 +342,9 @@ def __init__(
342342
speed. 9 is best compression. Defaults to -1.
343343
- `uuidRepresentation`: The BSON representation to use when encoding
344344
from and decoding to instances of :class:`~uuid.UUID`. Valid
345-
values are `pythonLegacy` (the default), `javaLegacy`,
346-
`csharpLegacy`, `standard` and `unspecified`. New applications
347-
should consider setting this to `standard` for cross language
345+
values are the strings: "pythonLegacy" (the default), "javaLegacy",
346+
"csharpLegacy", "standard" and "unspecified". New applications
347+
should consider setting this to "standard" for cross language
348348
compatibility. See :ref:`handling-uuid-data-example` for details.
349349
- `unicode_decode_error_handler`: The error handler to apply when
350350
a Unicode-related error occurs during BSON decoding that would

0 commit comments

Comments
 (0)