Skip to content

PYTHON-3033 Fix typo in uuid docs #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/examples/uuid.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. _handling-uuid-data-example:

Handling UUID Data
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pymongo/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ def __init__(
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
Expand Down