[Python-ideas] Moving _tkinter._flatten to somewhere else
Gregory P. Smith
greg at krypto.org
Sat Dec 13 20:22:51 CET 2008
On Sat, Dec 13, 2008 at 10:58 AM, Guilherme Polo <ggpolo at gmail.com> wrote:
> 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" ?
Per the irc discussion... If this is to be made a public API somewhere it
should be modernized to support the iterator protocol at which point it
could find a home in itertools.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas