This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author quentin.gallet-gilles
Recipients quentin.gallet-gilles
Date 2007-12-19.13:08:15
SpamBayes Score 0.0024988228
Marked as misclassified No
Message-id <1198069697.21.0.802905521155.issue1658@psf.upfronthosting.co.za>
In-reply-to
Content
While investigating for the stdlib reorg of Tkinter, I came across the
following error:

~/dev/py3k$ ./python Lib/lib-tk/Dialog.py 
Traceback (most recent call last):
  File "Lib/lib-tk/Dialog.py", line 45, in <module>
    Pack: {}})
  File "/home/quentin/dev/py3k/Lib/lib-tk/Tkinter.py", line 1996, in
__init__
    Widget.__init__(self, master, 'button', cnf, kw)
  File "/home/quentin/dev/py3k/Lib/lib-tk/Tkinter.py", line 1921, in
__init__
    for k in cnf.keys():
RuntimeError: dictionary changed size during iteration


The attached patch adds list() around the dict.keys() call.

On a related note, this doesn't appear to be an isolated error, since a
similar issue (#1649) was recently fixed in r59554. Would it be a good
idea to look for other identical cases ?
Files
File name Uploaded
tkinter_dictkeys.patch quentin.gallet-gilles, 2007-12-19.13:08:16
History
Date User Action Args
2007-12-19 13:08:17quentin.gallet-gillessetspambayes_score: 0.00249882 -> 0.0024988228
recipients: + quentin.gallet-gilles
2007-12-19 13:08:17quentin.gallet-gillessetspambayes_score: 0.00249882 -> 0.00249882
messageid: <1198069697.21.0.802905521155.issue1658@psf.upfronthosting.co.za>
2007-12-19 13:08:16quentin.gallet-gilleslinkissue1658 messages
2007-12-19 13:08:16quentin.gallet-gillescreate