(Nov-09-2020, 01:32 PM)TomasAm Wrote:(Nov-09-2020, 01:14 PM)buran Wrote: did you read my post?
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.
(Nov-09-2020, 01:43 PM)buran Wrote: It looks like you are somewhat confused. What do you mean to "happen" inside class?
I mean, can the logic you have written be inside Fabric class? Something like this(it is not functional, i am still trying to find out):
class Fabric: def __init__(self, humans): self.Body = humans def action(self) fabric.Body.top.eyes = 4 print(fabric.Body.top.eyes)maybe something like this?:
def action(self) humans.Body.top.eyes = 4 print(humans.Body.top.eyes)