Skip to content

Commit 6e4b3a8

Browse files
committed
Docs: Clarify oid.raw, str(oid), remove reference to Python 2
1 parent 2340215 commit 6e4b3a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/oid.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ The Oid type
5656
>>> raw = unhexlify("cff3ceaefc955f0dbe1957017db181bc49913781")
5757
>>> oid2 = Oid(raw=raw)
5858

59-
And the other way around, from an Oid object we can get the hexadecimal and raw
60-
forms. You can use the built-in `str()` (or `unicode()` in python 2) to get the
61-
hexadecimal representation of the Oid.
59+
And the other way around, from an Oid object we can get the raw form via
60+
`oid.raw`. You can use `str(oid)` to get the hexadecimal representation of the
61+
Oid.
6262

6363
.. method:: Oid.__str__()
6464
.. autoattribute:: pygit2.Oid.raw
@@ -72,6 +72,7 @@ The Oid type supports:
7272

7373
- `bool(oid)`, returning False if the Oid is a null SHA-1 (all zeros).
7474

75+
- `str(oid)`, returning the hexadecimal representation of the Oid.
7576

7677
Constants
7778
=========

0 commit comments

Comments
 (0)