On Mar 17, 2013, at 03:10 PM, R. David Murray wrote:
>There was a long thread about this on python-dev that might be worth going
>back over, where I had the same misconception (that functions should always
>return the same type as their arguments). While I think that should be the
>default design, it isn't always the best API. (The real rule, if I recall
>correctly, is that functions should never accept *mixed* argument types for
>input data.)
Totally agree about the mixed type rule.
But this is something different, and I know it's been discussed, and is a
difficult problem. It's causing real-world pain for people though, so it's
worth thinking about again. |