[Python-ideas] Moving _tkinter._flatten to somewhere else

Guilherme Polo ggpolo at gmail.com
Sat Dec 13 19:58:52 CET 2008


Hi there,

Probably many of you have seen/written/used a lot of recipes for
flattening lists/tuples, several of them are similar diverging just a
bit, some uses more obscure code than others, some are not fast
enough, but I have noticed all those have one thing in common: none of
them mention _tkinter._flatten, not even in comments (if the site
allows that).

Apparently _tkinter._flatten is unknown, and it being marked private
doesn't help, and it also lives under _tkinter but doesn't depend on
anything from tcl/tk. This _flatten has the advantage of being faster
then the alternatives I have seen coded in Python, since it is done in
C and its code is simple and it doesn't try to be too smart. It is
also already part of Python, it is just unknown to most apparently.

So, I would like to know what do you think about moving
_tkinter._flatten to some other module and renaming it to "flatten" ?

-- 
-- Guilherme H. Polo Goncalves



More information about the Python-ideas mailing list