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 serhiy.storchaka
Recipients serhiy.storchaka, terry.reedy
Date 2016-05-15.21:02:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463346145.01.0.881251156156.issue27025@psf.upfronthosting.co.za>
In-reply-to
Content
> The 'virtue' of the digit strings names is that they match tk behavior (I presume) and are consistently opaque ;-)

No, in Tk you have to give names for all widgets.

frame .main
button .main.ok

This is similar to how classes or functions are declared in Python. The name becomes an attribute of an object and a reference to an object. You shouldn't repeat it twice.

Here is a patch that implements nicer generated widget names.

The problem with ".frame1.button2" or ".frame-1.button-2" is that they look too human readable. If you use explicit names for the part of widgets and allow generating names for other part, there is large chance that generated "button2" or "button-2" will conflict with explicit names. I think we should use something that makes generated names uglier. Maybe prefix them with "_"? "._frame1._button2".
History
Date User Action Args
2016-05-15 21:02:25serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy
2016-05-15 21:02:25serhiy.storchakasetmessageid: <1463346145.01.0.881251156156.issue27025@psf.upfronthosting.co.za>
2016-05-15 21:02:24serhiy.storchakalinkissue27025 messages
2016-05-15 21:02:24serhiy.storchakacreate