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>
<https://bugs.python.org/issue32880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to