"to fixwrap the format call in try statement to catch the exceptionuse formatting expressions instead of the str format methoduse one of the aforementioned still-working str format usage modes and hope it does not change tooor wait for repair of this in later release here' the recommended workaround using the tried-and-true (it' also noticeably shorterbut won' repeat ' comparisons here) :\codepy - '%sobject __reduce__ "to apply this in the tree lister' codechange the first of these to its followerresult +spaces '{ }={ }\nformat(attrgetattr(objattr)result +spaces '% =% \ (attrgetattr(objattr)python has the same regression in but not --inherited from the changeapparently--but does not show object methods in this example since this example generates too much output in anyhowit' moot point herebut is decent example of real-world coding unfortunatelyusing newer features like str format sometimes puts your code in the awkward position of beta tester in the current lineusage variationrunning on larger modules for more fununcomment the underscore handler lines to enable them againand try mixing this class into something more substantiallike the button class of python' tkinter gui toolkit module in generalyou'll want to name listtree first (leftmostin class headerso its __str__ is picked upbutton has onetooand the leftmost superclass is always searched first in multiple inheritance the output of the following is fairly massive ( characters and lines in --and if you forget to uncomment the underscore detection!)so run this code on your own to see the full listing notice how our lister' __visited dictionary attribute mixes harmlessly with those created by tkinter itself if you're using python xalso recall that you should use tkinter for the module name instead of tkinterfrom listtree import listtree from tkinter import button class mybutton(listtreebutton)pass mybutton(text='spam'open('savetree txt'' 'write(str( ) len(open('savetree txt'readlines() print( <instance of mybuttonaddress both classes have __str__ listtree firstuse its __str__ save to file for later viewing lines in the file print the display here multiple inheritance"mix-inclasses