Small bug (assertion error) in PythonWin

Tim Peters tim.one at home.com
Sun May 6 21:57:35 CEST 2001


[Carlos Ribeiro]
> File "F:\Python21\Pythonwin\pywin\idle\PyParse.py", line 115,
> in set_str
>     assert len(str) == 0 or str[-1] == '\n'
> AssertionError
>
> It was not a fatal error. Anyway, assertions are here to signal a
> problem, isn't? My version information is:
>
> PythonWin 2.1 (#15, Apr 23 2001, 18:00:35) [MSC 32 bit (Intel)] on
> win32.
> Portions Copyright 1994-2001 Mark Hammond (MarkH at ActiveState.com) -
> see 'Help/About PythonWin' for further copyright information.

[Mark Hammond]
> Yeah - I occasionally get that too :(  One of these days... :)

I never see it in IDLE, so I suspect the difference will be traced to how
lines are getting sucked out of the underlying text widget.  The Tk text
widget *always* has a newline at the end of the buffer; if Scintilla's
doesn't, then PythonWin's emulation of the Tk text cmds used by AutoIdent.py
has to make it look like it does.





More information about the Python-list mailing list