File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1512,21 +1512,25 @@ PyDoc_STRVAR(property_doc,
15121512"\n"
15131513"fget is a function to be used for getting an attribute value, and likewise\n"
15141514"fset is a function for setting, and fdel a function for del'ing, an\n"
1515- "attribute. Typical use is to define a managed attribute x:\n"
1515+ "attribute. Typical use is to define a managed attribute x:\n\n "
15161516"class C(object):\n"
15171517" def getx(self): return self._x\n"
15181518" def setx(self, value): self._x = value\n"
15191519" def delx(self): del self._x\n"
15201520" x = property(getx, setx, delx, \"I'm the 'x' property.\")\n"
15211521"\n"
1522- "Decorators make defining new properties or modifying existing ones easy:\n"
1522+ "Decorators make defining new properties or modifying existing ones easy:\n\n "
15231523"class C(object):\n"
15241524" @property\n"
1525- " def x(self): return self._x\n"
1525+ " def x(self):\n"
1526+ " \"\I am the 'x' property.\"\n"
1527+ " return self._x\n"
15261528" @x.setter\n"
1527- " def x(self, value): self._x = value\n"
1529+ " def x(self, value):\n"
1530+ " self._x = value\n"
15281531" @x.deleter\n"
1529- " def x(self): del self._x\n"
1532+ " def x(self):\n"
1533+ " del self._x\n"
15301534);
15311535
15321536static int
You can’t perform that action at this time.
0 commit comments