Cell [29] in notebook ch06-classes-objects.ipynb gives an error as the (overloaded) constructor of the ElementaryParticle class doesn't create the data attributes initialized bu the generator of the Particle class.
This can be solved by calling Particle.__init__(self) explicitly:
# elementary.pyclassElementaryParticle(Particle):
roar="I am an Elementary Particle!"def__init__(self, spin):
Particle.__init__(self)
self.s=spinself.is_fermion=bool(spin%1.0)
self.is_boson=notself.is_fermion
Cell [29] in notebook ch06-classes-objects.ipynb gives an error as the (overloaded) constructor of the ElementaryParticle class doesn't create the data attributes initialized bu the generator of the Particle class.
This can be solved by calling
Particle.__init__(self)explicitly: