0.5.2
larryhastings
tagged this
04 Mar 14:06
The pushback string iterator used to pre-consume the string and fill in a list, one character per entry in the list. Pushing back a character just meant appending that character to the list. Now it's a stack of iterators. Pushing back a character means pushing an iterator that yields that character. This better optimizes for the general case, where we yield long strings of characters. Minor changes: * The previous pushback string iterator had a lurking bug: if you pushed a string of len(s) > 1, it would yield the characters of that string in reverse order. Perky never hit that bug, because it only ever pushes back individual characters. But still! * If a line is a triple-quoted string, don't ever yield a WHITESPACE token for trailing whitespace (if present). Perky's tokenizer suppresses *trailing* whitespace on the line in every other context, it needs to be consistent here. * Some doc improvements, mainly in the introductory section.
Assets 2
-
2021-03-04T14:06:59Z -
2021-03-04T14:06:59Z -