We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ObjectId.__str__()
1 parent 60289f0 commit e507078Copy full SHA for e507078
bson/objectid.py
@@ -15,7 +15,6 @@
15
"""Tools for working with MongoDB ObjectIds."""
16
from __future__ import annotations
17
18
-import binascii
19
import datetime
20
import os
21
import struct
@@ -234,7 +233,7 @@ def __setstate__(self, value: Any) -> None:
234
233
self.__id = oid
235
236
def __str__(self) -> str:
237
- return binascii.hexlify(self.__id).decode()
+ return self.__id.hex()
238
239
def __repr__(self) -> str:
240
return f"ObjectId('{self!s}')"
0 commit comments