bpo-29776: Use decorator syntax for properties. (#585)

This commit is contained in:
Serhiy Storchaka 2017-03-19 08:40:32 +02:00 committed by GitHub
parent c85a26628c
commit bdf6b910f9
10 changed files with 53 additions and 34 deletions

View file

@ -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