(Nov-09-2020, 01:14 PM)buran Wrote: did you read my post?
(Nov-09-2020, 12:01 PM)buran Wrote:fabric = Fabric(bode) print(fabric.Body.bottom.feets) fabric.Body.top.eyes = 2 # 2 eyes print(fabric.Body.top.eyes)I must comment on the inconsistencies in your class - e.g.Fabric.Body
attribute, whyBody
and notbody
? Also normally the params in__init__
will be the same as the attribute you assign, i.e. whyhumans
and notbody
?
Yes, I try to apply it now
fabric.Body.top.eyes = 2 # 2 eyesso this line logic happens inside Fabric class(not like now - this line is outside class). I am trying to create a function as solution. So when data arrives to this Fabric class data gets modified.