homepage

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 shippo_
Recipients epaine, serhiy.storchaka, shippo_
Date 2020年12月15日.23:34:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608075261.17.0.627268769628.issue42630@roundup.psfhosted.org>
In-reply-to
Content
First: thank you!
> I think Serhiy has done a very good job ...
I'm not saying he ain't! More so, I greatly appreciate everyone's time and effort. But I'm discussing the implementation here, not somebody's work.
Apparently I haven't been precise enough in conveying my message. Let me try to clarify what I mean. Consider the following:
An object gets initialized. The object's constructor accepts a "master" optional parameter (e.g. Variable.__init__). So, every time:
 -- "master" is None
 and
 -- _support_default_root is True
a default root must be instantiated. A master is optional, and when it's not given and _support_default_root switch is on, a default root should be supplied. That's the whole point of _support_default_root after all.
My understanding of the module is not as deep as yours', but getboolean(), mainloop() and image_types() shouldn't be affected.
"Too early to create image: no default root window": Why isn't there? When _support_default_root is on.
Again, I can see that:
> "no default root window" is correct
:But why is there no default window? Support default root is on, right?
> There is no yet default root window required by the function.
:A default root is required when you instantiate an Image without a "master". It's not required as an argument, but it is required for the operation of Image.
I'm suggesting something like:
> class Variable:
> ...
> def __init__(self, master=None, value=None, name=None):
> ...
> master = master or _get_default_root()
> self._root = master._root()
> ...
> class Image:
> ...
> def __init__(self, imgtype, name=None, cnf={}, master=None, **kw):
> ...
> master = master or _get_default_root()
> self.tk = getattr(master, 'tk', master)
> ...
Best Wishes
Ivo Shipkaliev
History
Date User Action Args
2020年12月15日 23:34:21shippo_setrecipients: + shippo_, serhiy.storchaka, epaine
2020年12月15日 23:34:21shippo_setmessageid: <1608075261.17.0.627268769628.issue42630@roundup.psfhosted.org>
2020年12月15日 23:34:21shippo_linkissue42630 messages
2020年12月15日 23:34:20shippo_create

AltStyle によって変換されたページ (->オリジナル) /