[docs] [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set

Serhiy Storchaka report at bugs.python.org
Fri Nov 30 15:49:49 CET 2012

Serhiy Storchaka added the comment:

I confirm this. The bug appears sporadically on 3.x.

When the entry displays text, self.entry1['textvariable'] is 'PY_VAR0'. When it does not, self.entry1['textvariable'] is '0' (actually the value of "text" parameter).

The bug is due to the fact that option "text" is applied after the option "textvariable". Due to string hash randomization it occurs in 50% on 3.3+ (and always or never on default 2.7, depending on other options used in this call). For work around this bug you should not use both "text" and "textvariable" keyword or dict parameters in one call. Probably it is worth to mention in the documentation (unfortunately the Tkinter documentation is almost non-existent).

assignee:  -> docs at python
components: +Documentation -Tkinter
nosy: +docs at python, serhiy.storchaka
stage:  -> needs patch
type: behavior -> enhancement

Python tracker <report at bugs.python.org>

More information about the docs mailing list