Terry J. Reedy <tjre...@udel.edu> added the comment:

set_str sets self.str and self.study_level.  After the first call, attempts to 
access unset instance parse attributes from other modules will raise 
AttributeError.  Removing the unneeded class setting will just add 2 more names 
to the list of things that should not be called directly.  The get_xyz 
functions (get_continuation_type is another) avoid AttributeError (unless 
self.str is not set) and ensure validity.

If set_str is called more than once, instance parse attributes will initially 
be set but invalid.  So it seems they should be either deleted or set to None.  
In the latter case, they should also be set to None initially.  I will look 
more at how the module is used.


Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to