[Python-3000] idle3.0 - is is supposed to work?

"Martin v. Löwis" martin at v.loewis.de
Fri Aug 10 00:36:15 CEST 2007


> I get the same failure on OSX (PPC) and on Linux (x86 Ubuntu). It has
> to do with the Tcl/Tk wrapping code, in particular it's in the
> LEAVE_PYTHON macro on line 1995 on _tkinter.c.

I'm not convinced. The actual failure is that "tag configure" is invoked
with a None tagname (which then gets stripped through flatten, apparently).
The ColorDelegator it originates from has these colors:
[('COMMENT', {'foreground': '#dd0000', 'background': '#ffffff'}),
('DEFINITION', {'foreground': '#0000ff', 'background': '#ffffff'}),
('hit', {'foreground': '#ffffff', 'background': '#000000'}), ('STRING',
{'foreground': '#00aa00', 'background': '#ffffff'}), ('KEYWORD',
{'foreground': '#ff7700', 'background': '#ffffff'}), ('stdout',
{'foreground': 'blue', 'background': '#ffffff'}), ('stdin',
{'foreground': None, 'background': None}), ('SYNC', {'foreground': None,
'background': None}), ('BREAK', {'foreground': 'black', 'background':
'#ffff55'}), ('BUILTIN', {'foreground': '#900090', 'background':
'#ffffff'}), ('stderr', {'foreground': 'red', 'background': '#ffffff'}),
('ERROR', {'foreground': '#000000', 'background': '#ff7777'}), (None,
{'foreground': '#000000', 'background': '#ffffff'}), ('console',
{'foreground': '#770000', 'background': '#ffffff'}), ('TODO',
{'foreground': None, 'background': None})
and invokes this code:
 for tag, cnf in self.tagdefs.items():
 if cnf:
 self.tag_configure(tag, **cnf)
so if None is a dictionary key (as it is), you get the error you
see.
Regards,
Martin


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /