Why don't strings share data in Python?
Mike Coleman
mkc+dated+1022375908.02c649 at mathdogs.com
Thu Apr 25 21:21:28 EDT 2002
sjmachin at lexicon.net (John Machin) writes:
> 1. Explain the utility of having a dict d such that d[foo] == foo, for
> *all* foo in d. If all you want is logically a set, not a mapping, do
> d[suffix] = 1.
Yeah, I was just generating an example. I should have used '1'--the real
problem is exactly the same either way.
The closest thing to a solution here was to look at the semi-documented
'buffer' objects. Thanks to who suggested that.
> 2. google("suffix tree"); google("suffix array")
Well, if a good suffix tree library existed, that'd be good, too. The only
one I see right now looks like it has some fairly severe implementation
limits. (Well, severe if you like your objects by the million... ;-)
Mike
More information about the Python-list
mailing list