I neglected to make a bunch of methods private that should not be accessed externally. All these below, I did not consider part of the public interface, but maybe some of them should be stabilized.
StringReader.current_line should be renamed to _current_line
It could be __current_line, but StringReader should be considered final anyway
Parser.consume should be renamed to _consume
Parser.cached_consume should be renamed to consume now that it is available
Parser.name_or_repr should be renamed to _name_or_repr
Parser.name_or_nothing should be renamed to _name_or_nothing
Parser.handle_other should be renamed to _handle_other
It could be __handle_other, but that would be the only use of this questionable Python feature
Parser.name and Parser.protected are funky in that it should only be accessed by Parser or the context. They are more like __name__ and __protected__, but it is unclear if claiming dunder names are appropriate here.
I neglected to make a bunch of methods private that should not be accessed externally. All these below, I did not consider part of the public interface, but maybe some of them should be stabilized.
StringReader.current_line
should be renamed to_current_line
__current_line
, butStringReader
should be considered final anywayParser.consume
should be renamed to_consume
Parser.cached_consume
should be renamed toconsume
now that it is availableParser.name_or_repr
should be renamed to_name_or_repr
Parser.name_or_nothing
should be renamed to_name_or_nothing
Parser.handle_other
should be renamed to_handle_other
__handle_other
, but that would be the only use of this questionable Python featureParser.name
andParser.protected
are funky in that it should only be accessed byParser
or the context. They are more like__name__
and__protected__
, but it is unclear if claiming dunder names are appropriate here.