Armin Ronacher wrote:
Basically the problematic situation with
iterable strings is something like
flatten function that flattens out every iterable object except of
To flesh out the span of your "something like", recently I had a WSGI-based app that to some request mistakenly returned a 200K string instead of the same wrapped as a 1-element list; and the WSGI layer -according to spec- served it back character by character. Which "worked" - and durably confused not only me but IIS and a network router as well.
While blame can certainly be assigned elsewhere - WSGI spec or implementation (wsgiref included) - unwelcome iterability of strings was a necessary cause.