Message224883
The resolution of this issue should be to properly document the Tk class. The 3.4 docs currently say:
"class tkinter.Tk(screenName=None, baseName=None, className='Tk', useTk=1)
The Tk class is instantiated without arguments. This creates a toplevel widget of Tk which usually is the main window of an application. Each instance has its own associated Tcl interpreter."
The signature is incomplete -- see below. The first sentence is wrong; there are arguments, they just all happen to have defaults. The next sentence should be something like "Return a toplevel Tk widget, which is usually the main window of an application."
Tk.__doc__ is 'Toplevel widget of Tk which represents mostly the main window\n of an application. It has an associated Tcl interpreter.' This is probably ok.
Tk.__init__ signature and Tk,__init__.__doc__ are
__init__(self, screenName=None, baseName=None, className='Tk', useTk=1, sync=0, use=None)
"Return a new Toplevel widget on screen SCREENNAME. A new Tcl interpreter will
be created. BASENAME will be used for the identification of the profile file (see
readprofile).
It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME
is the name of the widget class."
"Toplevel" should be "toplevel" as in : Tk is not a subclass of Toplevel. Rather Toplevel is similar to Tk but with the BaseWidget signature.
The argument list needs to be completed and perhaps a bit more said about the one documented. Does 'screen' apply to anything other than X11? Could it be used on Windows to put the window on a secondary screen? Is Gnome the only user framework that uses classname? |
|
Date |
User |
Action |
Args |
2014-08-05 20:23:41 | terry.reedy | set | recipients:
+ terry.reedy, roger.serwy, docs@python, th9, zup, serhiy.storchaka |
2014-08-05 20:23:40 | terry.reedy | set | messageid: <1407270220.98.0.255619819468.issue13553@psf.upfronthosting.co.za> |
2014-08-05 20:23:40 | terry.reedy | link | issue13553 messages |
2014-08-05 20:23:40 | terry.reedy | create | |
|