mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Rename 'getset' to 'property'.
This commit is contained in:
parent
2872e8a654
commit
8bce4acb17
6 changed files with 45 additions and 45 deletions
|
@ -48,12 +48,12 @@ class Rat(object):
|
|||
def _get_num(self):
|
||||
"""Accessor function for read-only 'num' attribute of Rat."""
|
||||
return self.__num
|
||||
num = getset(_get_num, None)
|
||||
num = property(_get_num, None)
|
||||
|
||||
def _get_den(self):
|
||||
"""Accessor function for read-only 'den' attribute of Rat."""
|
||||
return self.__den
|
||||
den = getset(_get_den, None)
|
||||
den = property(_get_den, None)
|
||||
|
||||
def __repr__(self):
|
||||
"""Convert a Rat to an string resembling a Rat constructor call."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue