summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-11-24 22:53:54 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-11-24 22:53:54 (GMT)
commit799f81b14c554547eeb64bafc0019995b7f08b03 (patch)
treec72eef5fad9208fb66d783d356bbb57ab8a19843 /Objects
parent217f5c4eda531e89da665cc45d2f592c6209b10c (diff)
parent97fc2ba6bf4624a7cec376019f3a86a5a5db5967 (diff)
downloadcpython-799f81b14c554547eeb64bafc0019995b7f08b03.zip
cpython-799f81b14c554547eeb64bafc0019995b7f08b03.tar.gz
cpython-799f81b14c554547eeb64bafc0019995b7f08b03.tar.bz2
merge
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index da88f86..2f0e796 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1547,21 +1547,25 @@ PyDoc_STRVAR(property_doc,
"\n"
"fget is a function to be used for getting an attribute value, and likewise\n"
"fset is a function for setting, and fdel a function for del'ing, an\n"
-"attribute. Typical use is to define a managed attribute x:\n"
+"attribute. Typical use is to define a managed attribute x:\n\n"
"class C(object):\n"
" def getx(self): return self._x\n"
" def setx(self, value): self._x = value\n"
" def delx(self): del self._x\n"
" x = property(getx, setx, delx, \"I'm the 'x' property.\")\n"
"\n"
-"Decorators make defining new properties or modifying existing ones easy:\n"
+"Decorators make defining new properties or modifying existing ones easy:\n\n"
"class C(object):\n"
" @property\n"
-" def x(self): return self._x\n"
+" def x(self):\n"
+" \"\I am the 'x' property.\"\n"
+" return self._x\n"
" @x.setter\n"
-" def x(self, value): self._x = value\n"
+" def x(self, value):\n"
+" self._x = value\n"
" @x.deleter\n"
-" def x(self): del self._x\n"
+" def x(self):\n"
+" del self._x\n"
);
static int