> From: Oren Tirosh [mailto:oren-py-d@hishome.net] > > > Oren Tirosh wrote: > > > alias for this type. No two istr instances are equal > unless they are > > > identical. I guess PyString_CheckExact would need to be > > you assuming > that == would be equivalent to 'is' for istrs? The == > operator should work > exactly the same, just possibly a little faster when > comparing two istrs. > > (type(s) is istr and type(t) is istr and s == t) implies (s is t). Do you mean that comparing two instances of istr would use *is*, but comparing an istr with any other instance would use the normal str compare? Because that is not how it has come across. My first thought when I saw this proposal was "neat". My second was "yuk". The #1 most important consideration here is backwards compatibility IMO. Whilst I would be personally unaffected by this change (allowing interned strings to be collected), we've already had examples of people and code that would be. Tim Delaney
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