Andrew Barnert wrote:
A function to recursively flatten a nested list should only work on lists; it should stop on a string, but it should also stop on a namedtuple or a 2x2 ndarray or a dict.
True, but then it still makes no difference whether iterating over a string gives more strings or something else. -- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/XNYZPPP7MLNWZ2IDUDRMSGOHSSBGN5K2/ Code of Conduct: http://python.org/psf/codeofconduct/