mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-29776: Use decorator syntax for properties. (#585)
This commit is contained in:
parent
c85a26628c
commit
bdf6b910f9
10 changed files with 53 additions and 34 deletions
|
@ -1674,13 +1674,13 @@ class Decimal(object):
|
|||
|
||||
__trunc__ = __int__
|
||||
|
||||
@property
|
||||
def real(self):
|
||||
return self
|
||||
real = property(real)
|
||||
|
||||
@property
|
||||
def imag(self):
|
||||
return Decimal(0)
|
||||
imag = property(imag)
|
||||
|
||||
def conjugate(self):
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue