<s> from traits . api import HasTraits , Float , TraitError <EOL> class Person ( HasTraits ) : <EOL> weight = Float ( <NUM_LIT> ) <EOL> joe = Person ( ) <EOL> print joe . weight <EOL> joe . weight = <NUM_LIT> <EOL> print joe . weight <EOL> joe . weight = <NUM_LIT> <EOL> print joe . weight <EOL> try : <EOL> joe . weight = '<STR_LIT>' <EOL> print "<STR_LIT>" <EOL> except TraitError : <EOL> print "<STR_LIT>" </s>
