3 ms·
>I would call that a personal preference shrug it's two features that I see causing two classes of bugs on an extremely regular basis. It's a trade off that a
by crdoconnor 8y ago
>I would call that a personal preference
shrug it's two features that I see causing two classes of bugs on an extremely regular basis.
It's a trade off that affects everybody, but it's hard to weight up the trade off without a lot of experience.
>There isn't anything like this consensus for the changes you are suggesting.
Exactly what I said, yes...
>This change would make Python more strict about typing than virtually all mainstream static languages!
I think dialing up the strictness is a good thing and so do the language designers (that was the idea behind introducing type hints).
>Again, not something most people would use.
That's exactly the point. Making strings iterable list of characters isn't something that most people use - its primary function is to cause weird bugs for functions that take lists of strings (and you get an output like 'm', 'y', 'd', etc.).
Changing it so that you'd have to do string.chars to get an iterable list would, at very little cost, cut out a pretty common class of bug.