Terry J. Reedy added the comment:

1. I prefer to not deal with ttk styles yet, unless forced, and we don't seem 
to be here.
2. Yes, I wanted to get rid of that useless frame as part of refactoring.
3. 'self.x = x = expr' is a semi-common idiom.  A local name is nice when there 
are multiple local references to the object.  Dereferencing a local name is 
faster than an attribute, though it may not be enough to worry about unless 
there is a loop.  No having so many 'self.' prefixes makes the code less 
cluttered and probably easier to read. The attribute is obviously needed to 
(directly) refer to the widget outside the method, whether in other methods of 
the class or outside functions such as in tests. You have probably noticed 
expression statements, like "Widget(parent, opt=val).grid(...), where no Python 
binding is kept.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30495>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to