New submission from Russell Crosser <russell.cros...@gmail.com>:

Declaring a widget in the following form:
...
label2 = ttk.Label(root, text='Show2 Label').pack()
...
leaves the widget with a NoneType, and unable to be assigned to (for instance 
to assign new text). If giving a widget a name, I expect to use it later in the 
program.
This declaration works correctly:
...
label2 = ttk.Label(root, text='Show2 Label')
label2.pack()
...
Simple tkinter program attached. Only tested with 3.9.6 on Win 10.

----------
components: Tkinter
files: test_pack.py
messages: 400032
nosy: rcrosser
priority: normal
severity: normal
status: open
title: Named widget has NoneType after single line creation
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50228/test_pack.py

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

Reply via email to