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.

classification
Title: tkapp read-only attributes
Type: Stage:
Components: Tkinter Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: gpolo, loewis, peeble
Priority: normal Keywords:

Created on 2005-08-12 15:57 by peeble, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg60800 - (view) Author: peeb (peeble) Date: 2005-08-12 15:57
same as bug:
[ 1164742 ] Tkdnd.py crashes due to read-only attributes

Python 2.4.1 (#1, Mar 30 2005, 23:01:07) 
[GCC 3.3.5] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import Tkinter
>>> r=Tkinter.Tk()   
>>> r.a=1
>>> del r.a
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/lib-tk/Tkinter.py", line
1660, in __delattr__
    return delattr(self.tk, attr)
TypeError: 'tkapp' object has only read-only attributes
(del .a)

The problem vanishes commenting out the __delattr__
methods in class Tk (module Tkinter.py):

class Tk(Misc, Wm):
    ...
    def __delattr__(self, attr):
        "Delegate attribute access to the interpreter
object"
        return delattr(self.tk, attr)

I don't know if there is same subtle problem.
msg73276 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-09-15 17:43
This was fixed in r38525
msg73277 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-09-15 17:46
My bad, r39219 is the one.
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42274
2008-09-15 17:46:17gpolosetmessages: + msg73277
2008-09-15 17:43:03gpolosetstatus: open -> closed
nosy: + gpolo
resolution: fixed
messages: + msg73276
2005-08-12 15:57:59peeblecreate