Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2c09057
add test for the predefined object's attributes
furkanonder Mar 25, 2023
9a71e36
Include the "object" type in the lists of documented types
furkanonder Mar 25, 2023
d327409
remove 'or' from augment tuple
furkanonder Mar 28, 2023
73698a5
📜🤖 Added by blurb_it.
blurb-it[bot] Mar 28, 2023
1064065
Add cross-reference to news
furkanonder Mar 30, 2023
ce4d192
Fix format for the function parameter
furkanonder Mar 30, 2023
aca2c04
Add space
furkanonder Mar 30, 2023
f6c12d8
add reference for the 'object'
furkanonder Mar 30, 2023
b1ab4a2
add reference for NotImplemented
furkanonder Mar 30, 2023
d709946
Change ref:`string <textseq>` as class:`str`
furkanonder Mar 31, 2023
105f331
remove hyphen from `newly-created`
furkanonder Mar 31, 2023
119e29b
Update Doc/reference/datamodel.rst
terryjreedy Jun 18, 2023
d8c1995
Merge branch 'main' into issue-60712
furkanonder Jun 7, 2024
7762a08
Update predefined attribute types in testPredefinedAttrs
furkanonder Jul 17, 2024
7ffed7c
Change `universal type` as `top type`
furkanonder Jul 17, 2024
5ad51b9
Merge branch 'main' into issue-60712
furkanonder Jul 20, 2024
71a2d43
Don't mention about the top type
furkanonder Aug 11, 2024
2d9f0a0
Update the description of richcmpfuncs
furkanonder Aug 11, 2024
10adcee
Update Doc/library/stdtypes.rst
furkanonder Aug 12, 2024
f9961eb
Merge branch 'main' into issue-60712
furkanonder Aug 12, 2024
ab5ef40
Revert: Hierarchy Section in Data Model Documentation
furkanonder Oct 17, 2024
6681f67
Revert to original explanations of __new__ and __init__ methods in da…
furkanonder Oct 20, 2024
7d68154
Merge branch 'main' into issue-60712
furkanonder Oct 20, 2024
3f41130
Update Doc/reference/datamodel.rst
furkanonder Oct 21, 2024
026e514
Remove blank line
furkanonder Oct 21, 2024
7181046
Use ref:`str <textseq>` instead of :class:`str
furkanonder Oct 21, 2024
69b710a
Merge branch 'main' into issue-60712
furkanonder Oct 21, 2024
55f8c6a
Revert changes the description of Other Built-in Types in stdtypes.rst
furkanonder Oct 21, 2024
b199746
Update Doc/reference/datamodel.rst
furkanonder Oct 22, 2024
cf6efa1
Merge branch 'main' into issue-60712
willingc Oct 30, 2024
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
Prev Previous commit
Next Next commit
Update the description of richcmpfuncs
  • Loading branch information
furkanonder committed Aug 11, 2024
commit 2d9f0a0af36c497fb1e8c744b50e4a7c6c23cbd6
15 changes: 8 additions & 7 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,7 @@ Basic customization
The return value must be a string object.

The default implementation by the :class:`object` class should be given
an empty *format_spec* string. It delegates to :meth:`__str__`
an empty *format_spec* string. It delegates to :meth:`__str__`.

.. versionchanged:: 3.4
The __format__ method of ``object`` itself raises a :exc:`TypeError`
Expand Down Expand Up @@ -1837,9 +1837,10 @@ Basic customization
operations from a single root operation, see :func:`functools.total_ordering`.

By default, the :class:`object` class provides implementations consistent
with :ref:`comparisons`: equality compares according to object identity,
and order comparisons raise :exc:`TypeError`. Each default method may generate
these results directly, but may also return :data:`NotImplemented`.
with :ref:`expressions-value-comparisons`: equality compares according to
object identity, and order comparisons raise :exc:`TypeError`. Each default
method may generate these results directly, but may also return
:data:`NotImplemented`.

See the paragraph on :meth:`__hash__` for
some important notes on creating :term:`hashable` objects which support
Expand Down Expand Up @@ -2041,8 +2042,8 @@ access (use of, assignment to, or deletion of ``x.name``) for class instances.
.. method:: object.__dir__(self)

Called when :func:`dir` is called on the object. An iterable must be
returned. The :func:`dir` converts the returned iterable to a list and
sorts it. The :class:`object` class itself provides an implementation
returned. The :func:`dir` function converts the returned iterable to a list
and sorts it. The :class:`object` class itself provides an implementation
Comment thread
furkanonder marked this conversation as resolved.
Outdated
consistent with the :func:`dir` behaviour for arbitrary objects.


Expand Down Expand Up @@ -2112,7 +2113,7 @@ method (a so-called *descriptor* class) appears in an *owner* class (the
descriptor must be in either the owner's class dictionary or in the class
dictionary for one of its parents). In the examples below, "the attribute"
refers to the attribute whose name is the key of the property in the owner
class' :attr:`__dict__`. The :class:`object` class itself does not
class' :attr:`~object.__dict__`. The :class:`object` class itself does not
implement any of these protocols.

.. method:: object.__get__(self, instance, owner=None)
Expand Down