Isn't it the case that you should only get a secondary prompt after the comment line if the comment line *itself* had a secondary prompt? On Wed, May 7 2003 Skip Montanaro wrote: > > Guido> Please do. The indentation level should be easily available, > Guido> since it is computed by the tokenizer. > > Alas, it's more complicated than just the indentation level of the current > line. I need to know if the previous line was indented, which I don't think > the tokenizer knows (at least examining *tok in gdb under various conditions > suggests it doesn't). > > I see the following possible cases (there are perhaps more, but I think they > are similar enough to ignore here): > > >>> if x == y: > ... # hello > ... pass > ... > >>> if x == y: > ... x = 1 > ... # hello > ... pass > ... > >>> x = 1 > >>> # hello > ... > >>> > > Only the last case should display the primary prompt after the comment is > entered. The other two correctly display the secondary prompt. It's > distinguishing the second and third cases in the tokenizer without help from > the parser that's the challenge. > > Oh well. Perhaps it's a wart best left alone. -- Sjoerd Mullender <sjoerd@acm.org>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4