On Wed, 3 Jul 2002, Oren Tirosh wrote: > On Tue, Jul 02, 2002 at 11:07:14PM -0700, Ka-Ping Yee wrote: > > Oren Tirosh wrote: > > > No two istr instances are equal unless they are > > > identical. I guess PyString_CheckExact would need to be changed to > > > accept either String or InternedString. [...] > > Pass an 'istr' into a routine that expects strings, and it would > > appear to be a string right up until someone tried to == it, whereupon > > all hell would break loose. > > I don't understand your assumptions. I just went on what you wrote: "No two istr instances are equal unless they are identical." I read that to mean that == would be implemented with pointer comparison, which would break contracts the way i described. I see now that is not what you meant. It appears that what you are proposing is what interned string comparison already does (since == checks for pointer equality first). So, the only observable effect of the change would be to break all code that tests for type(s) == str. -- ?!ng
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