Skip to content
Closed
Prev Previous commit
Next Next commit
style
  • Loading branch information
Xiaokang2022 authored Oct 29, 2024
commit 9f0e79ac159b868f997b764f92943d5228965df7
3 changes: 2 additions & 1 deletion Lib/tkinter/ttk.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ def state(self, statespec=None):

def cget(self, key):
Comment thread
Xiaokang2022 marked this conversation as resolved.
"""Return the resource value for a KEY given as string."""
if isinstance(return_value := super().cget(key), _tkinter.Tcl_Obj):
return_value = super().cget(key)
if isinstance(return_value, _tkinter.Tcl_Obj):
return str(return_value)
return return_value

Expand Down