Is there anyway to set the variables of all instances of a class at the same time? I\'ve got a simplified example below:
class Object(): def __init__(self
You could use a class attribute:
class Object(): speed = 0 instance0=Object() instance1=Object() instance2=Object() Object.speed=5 # instance0.speed == instance1.speed == instance2.speed == Object.speed == 5
However this would mean that all instances would always have the same speed.
speed