PYTHON-3033 Fix typo in uuid docs (#808)

This commit is contained in:
Shane Harvey 2021-12-06 11:26:36 -08:00 committed by GitHub
parent 5ec4e6cc4c
commit 44853ea9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
.. _handling-uuid-data-example:
Handling UUID Data
@ -12,7 +13,7 @@ to MongoDB and retrieve them as native :class:`uuid.UUID` objects::
from uuid import uuid4
# use the 'standard' representation for cross-language compatibility.
client = MongoClient(uuid_representation=UuidRepresentation.STANDARD)
client = MongoClient(uuidRepresentation='standard')
collection = client.get_database('uuid_db').get_collection('uuid_coll')
# remove all documents from collection

View File

@ -325,9 +325,9 @@ class MongoClient(common.BaseObject):
speed. 9 is best compression. Defaults to -1.
- `uuidRepresentation`: The BSON representation to use when encoding
from and decoding to instances of :class:`~uuid.UUID`. Valid
values are `pythonLegacy`, `javaLegacy`, `csharpLegacy`, `standard`
and `unspecified` (the default). New applications
should consider setting this to `standard` for cross language
values are the strings: "standard", "pythonLegacy", "javaLegacy",
"csharpLegacy", and "unspecified" (the default). New applications
should consider setting this to "standard" for cross language
compatibility. See :ref:`handling-uuid-data-example` for details.
- `unicode_decode_error_handler`: The error handler to apply when
a Unicode-related error occurs during BSON decoding that would