diff -r bb67b810aac1 Lib/tkinter/ttk.py --- a/Lib/tkinter/ttk.py Mon Feb 23 07:56:13 2015 -0800 +++ b/Lib/tkinter/ttk.py Wed Feb 25 16:54:57 2015 -0800 @@ -374,21 +374,23 @@ class Style(object): def configure(self, style, query_opt=None, **kw): """Query or sets the default value of the specified option(s) in style. Each key in kw is an option and each value is either a string or a sequence identifying the value for that option.""" if query_opt is not None: kw[query_opt] = None - return _val_or_dict(self.tk, kw, self._name, "configure", style) + result = _val_or_dict(self.tk, kw, self._name, "configure", style) + if result or query_opt: + return result def map(self, style, query_opt=None, **kw): """Query or sets dynamic values of the specified option(s) in style. Each key in kw is an option and each value should be a list or a tuple (usually) containing statespecs grouped in tuples, or list, or something else of your preference. A statespec is compound of one or more states and then a value.""" @@ -459,26 +461,28 @@ class Style(object): def element_create(self, elementname, etype, *args, **kw): """Create a new element in the current theme of given etype.""" spec, opts = _format_elemcreate(etype, False, *args, **kw) self.tk.call(self._name, "element", "create", elementname, etype, spec, *opts) def element_names(self): """Returns the list of elements defined in the current theme.""" - return self.tk.splitlist(self.tk.call(self._name, "element", "names")) + return tuple(n.lstrip('-') for n in self.tk.splitlist( + self.tk.call(self._name, "element", "names"))) def element_options(self, elementname): """Return the list of elementname's options.""" - return self.tk.splitlist(self.tk.call(self._name, "element", "options", elementname)) + return tuple(o.lstrip('-') for o in self.tk.splitlist( + self.tk.call(self._name, "element", "options", elementname))) def theme_create(self, themename, parent=None, settings=None): """Creates a new theme. It is an error if themename already exists. If parent is specified, the new theme will inherit styles, elements and layouts from the specified parent theme. If settings are present, they are expected to have the same syntax used for theme_settings.""" script = _script_from_settings(settings) if settings else ''