mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
Issue #23912: Fix code formatting in datamodel.rst.
Patch by James Edwards.
This commit is contained in:
parent
1c69c3e3d8
commit
770319d6bd
1 changed files with 3 additions and 3 deletions
|
|
@ -2222,9 +2222,9 @@ correctness, implicit special method lookup generally also bypasses the
|
||||||
:meth:`__getattribute__` method even of the object's metaclass::
|
:meth:`__getattribute__` method even of the object's metaclass::
|
||||||
|
|
||||||
>>> class Meta(type):
|
>>> class Meta(type):
|
||||||
... def __getattribute__(*args):
|
... def __getattribute__(*args):
|
||||||
... print("Metaclass getattribute invoked")
|
... print("Metaclass getattribute invoked")
|
||||||
... return type.__getattribute__(*args)
|
... return type.__getattribute__(*args)
|
||||||
...
|
...
|
||||||
>>> class C(object, metaclass=Meta):
|
>>> class C(object, metaclass=Meta):
|
||||||
... def __len__(self):
|
... def __len__(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue