summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descrtut.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-06 21:56:42 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-06 21:56:42 (GMT)
commit8bce4acb17ee7146c5736ad020ea0e129bd7f67b (patch)
tree6bc493ecb49a8920dbaa7904e773b9756061d8a6 /Lib/test/test_descrtut.py
parent2872e8a654dbabaadbdeb513a962b0a23533dfe3 (diff)
downloadcpython-8bce4acb17ee7146c5736ad020ea0e129bd7f67b.zip
cpython-8bce4acb17ee7146c5736ad020ea0e129bd7f67b.tar.gz
cpython-8bce4acb17ee7146c5736ad020ea0e129bd7f67b.tar.bz2
Rename 'getset' to 'property'.
Diffstat (limited to 'Lib/test/test_descrtut.py')
-rw-r--r--Lib/test/test_descrtut.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py
index 121eed5..3847d66 100644
--- a/Lib/test/test_descrtut.py
+++ b/Lib/test/test_descrtut.py
@@ -315,7 +315,7 @@ test_5 = """
Attributes defined by get/set methods
- >>> class getset(object):
+ >>> class property(object):
...
... def __init__(self, get, set=None):
... self.__get = get
@@ -344,7 +344,7 @@ getx() and and setx():
... if x < 0: x = 0
... self.__x = x
...
- ... x = getset(getx, setx)
+ ... x = property(getx, setx)
Here's a small demonstration:
@@ -357,11 +357,11 @@ Here's a small demonstration:
0
>>>
-Hmm -- getset is builtin now, so let's try it that way too.
+Hmm -- property is builtin now, so let's try it that way too.
- >>> del getset # unmask the builtin
- >>> getset
- <type 'getset'>
+ >>> del property # unmask the builtin
+ >>> property
+ <type 'property'>
>>> class C(object):
... def __init__(self):
@@ -371,7 +371,7 @@ Hmm -- getset is builtin now, so let's try it that way too.
... def setx(self, x):
... if x < 0: x = 0
... self.__x = x
- ... x = getset(getx, setx)
+ ... x = property(getx, setx)
>>> a = C()