[Steve Holden] > ... > While I understand perfectly well the pragmatic case for this change, it > appears to blur the borders between set membership and subsetting; if > it's so desirable, why didn't the need arise earlier?. Mostly because the possibility for a type to define a __contains__ implementation didn't used to exist. Now that any type can define "x in y" to do what makes most sense for its instances, the rationale for strings retaining strained (for strings) "I'm just a sequence, you see, exactly like any other sequence" __contains__ semantics has grown much weaker.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4