Message212001
> > <tkinter.Button object .3070343372.3066782348>
>
> Not knowing the internal of tkinter, this seems somewhat confusing.
> Is that an "anonymous name/id"?
If the name parameter is not specified, repr(id(self)) is used. Here is a
button with id() == 3066782348, its parent has id() == 3070343372 and its
grandparent is root. str() for this button returns full name
".3070343372.3066782348".
> > <tkinter.Button object .panel.b1>
>
> This already looks more useful. How is that determined? Why the "first"
> object is missing (i.e. .panel seems to be an attribute of a missing
> object)?
Tk widgets are organized in hierarchical structure and names look similar to
file system names. "." is the root, ".frame" is a frame in the root,
".frame.b1" is a button in frame ".frame".
> Regarding the patch, are you sure that .__class__.__module__ is always
> available? I seem to remember that it might be missing in some cases, e.g.
> modules written in C (but I might be confusing it with something else like
> __file__).
Yes, for example __module__ is absent in _tkinter.TkappType. But I think that
every Python implemented class has __module__. |
|
Date |
User |
Action |
Args |
2014-02-23 15:33:12 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, gpolo, ezio.melotti |
2014-02-23 15:33:12 | serhiy.storchaka | link | issue20636 messages |
2014-02-23 15:33:11 | serhiy.storchaka | create | |
|