Sorry I should have made things more clear. I am talking about in things like function signatures.<p>Doing something like isinstance(x, str) is discouraged and considered non-pythonic, and recently hasattr() has also been talked about. However, both strings and lists can be iterated, so assuming that this will fail is incorrect:<p><pre><code>    x = &quot;Hello&quot;
    for y in x:
        print(&quot;{} is {}&quot;.format(y, type(y)))

</code></pre>
I asked on IRC and ultimately the only answer I got was that the most pythonic way to do things was to name functions whatever_str and whatever_list.<p>edit: I also should have said above &quot;lists can&#x27;t be compared with strings using &lt;&quot;. I was trying to point out Python did things potentially correctly there, but I see now it&#x27;s ambiguous.