Tkinter's button
Alex Martelli
aleax at aleax.it
Wed Nov 6 09:47:03 EST 2002
black wrote:
>
> thanx but why we could check items by format like this: myButton["state"]
> as I remembered that is with dictionary, while myButton is instance here
> how could we invoke a dictionary with an instance name ? thanx in advance~
Tkinter widgets are mappings (as well as being other things too). Any
class can define its instances to be mappings if it wants to -- the class
just needs to implement special methods __getitem__ etc appropriately (or
their equivalents for C=coded extension types).
Not sure what you mean by "invoke a dictionary with an instance name".
Alex
More information about the Python-list
mailing list