Shawn Walker wrote:

> >I'd figured that they'd simply disappeared because strings all become
> >unicode objects, and that the functions became something else.  Looks
> >like PyUnicode_Intern*() exist in 3.1, even if they don't in 2.6.
> 
> Yes and no.  8-bit strings use PyBytes by default as I understand it,
> which doesn't support intern, so unless you explicitly use Unicode()
> objects for all strings you don't get this.  But perhaps I'm
> misunderstanding...

All strings are unicode objects by default unless you explicitly create a
bytes object instead.  Of course, you save space by using bytes objects
when you know you're not going to need unicode, so there's a bit of a
tradeoff there.

> I have no strong preference here in light of intern(), although I
> remain uncertain about the garbage collection aspects of it.

Since your thing works, I don't think it's worth going to a whole lot of
effort to move to the official interning interface, especially since
there's uncertainty about the gc.  It'd be nice to characterize it better
than that, but I'm willing to let that go.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to