adding all files done so far
This commit is contained in:
16
learning/descriptors/test.py
Normal file
16
learning/descriptors/test.py
Normal file
@@ -0,0 +1,16 @@
|
||||
class P(object):
|
||||
def __init__(self, x):
|
||||
self._x = x
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
return self._x
|
||||
|
||||
@x.setter
|
||||
def x(self, x):
|
||||
if x < 0:
|
||||
self._x = 0
|
||||
elif x > 1000:
|
||||
self._x = 1000
|
||||
else:
|
||||
self._x = x
|
||||
Reference in New Issue
Block a user