so farso good--this is the normal case but notice what happens when we change the class attribute dynamically outside the class statementit also changes the attribute in every object that inherits from the class moreovernew instances created from the class during this session or program run also get the dynamically set valueregardless of what the class' source code saysx ( may change more than changes too inherits from ' runtime values (but assigning to changes in jnot or iis this useful feature or dangerous trapyou be the judge as we learned in you can actually get work done by changing class attributes without ever making single instance-- technique that can simulate the use of "recordsor "structsin other languages as refresherconsider the following unusual but legal python programclass xpass class ypass make few attribute namespaces use class attributes as variables no instances anywhere to be found for in range( )print( iprints herethe classes and work like "filelessmodules--namespaces for storing variables we don' want to clash this is perfectly legal python programming trickbut it' less appropriate when applied to classes written by othersyou can' always be sure that class attributes you change aren' critical to the class' internal behavior if you're out to simulate structyou may be better off changing instances than classesas that way only one object is affectedclass recordpass record( name 'bobx job 'pizza makerchanging mutable class attributes can have side effectstoo this gotcha is really an extension of the prior because class attributes are shared by all instancesif class attribute references mutable objectchanging that object in place from any instance impacts all instances at onceclass gotchas