mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
MERGE: Closes #16294: 8 space indent in tutorial
This commit is contained in:
commit
80c2f4fc43
1 changed files with 2 additions and 2 deletions
|
|
@ -259,9 +259,9 @@ applications include caching objects that are expensive to create::
|
||||||
>>> import weakref, gc
|
>>> import weakref, gc
|
||||||
>>> class A:
|
>>> class A:
|
||||||
... def __init__(self, value):
|
... def __init__(self, value):
|
||||||
... self.value = value
|
... self.value = value
|
||||||
... def __repr__(self):
|
... def __repr__(self):
|
||||||
... return str(self.value)
|
... return str(self.value)
|
||||||
...
|
...
|
||||||
>>> a = A(10) # create a reference
|
>>> a = A(10) # create a reference
|
||||||
>>> d = weakref.WeakValueDictionary()
|
>>> d = weakref.WeakValueDictionary()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue