You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:The text was updated successfully, but these errors were encountered: