@bpm.setter
def bpm(self, new_bpm):
'''
Permits to change the beat rate while the motion is performing
'''
self._bpm = new_bpm
self.frequency = self._bpm / 60.0
I understand that it is to change the bpm, but why not just make a :
It means that when you do yourinstance.bpm = 70, it will do exactly what you said (set _bpm and frequency appropriately, following the bpm function). It is a way to hide some complexity for the user that he should not have to deal with. And to also not have to change the interface all the time.