File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,17 @@ def _getPosition(self):
43
43
44
44
def _setPosition (self , newPosition ):
45
45
"""
46
- Getter property for Position attribute
46
+ Setter property for Position attribute
47
47
"""
48
- if (not isinstance (newPosition , tuple ) or
49
- len (newPosition ) != 2 or
50
- not all (isinstance (x , int ) for x in newPosition ) or
51
- not all (x >= 0 for x in newPosition )):
52
- raise TypeError ("position must be a tuple of 2 positive integers" )
48
+ if (not isinstance (newPosition , tuple )):
49
+ raise TypeError ("position must be a tuple of 2 positive integers" )
50
+ if len (newPosition ) != 2 :
51
+ raise TypeError ("position must be a tuple of 2 positive integers" )
52
+ if not all (isinstance (x , int ) for x in newPosition ):
53
+ raise TypeError ("position must be a tuple of 2 positive integers" )
54
+ if not all (x >= 0 for x in newPosition ):
55
+ raise TypeError ("position must be a tuple of 2 positive integers" )
56
+
53
57
self .__position = newPosition
54
58
55
59
def area (self ):
You can’t perform that action at this time.
0 commit comments