lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <va...@apache.org>
Subject Re: how to instantiate a Set?
Date Mon, 23 Feb 2009 17:29:10 GMT

On Feb 23, 2009, at 8:42, Bill Janssen <janssen@parc.com> wrote:

>>>> a = JavaSet(set(['foo', 'bar', 'baz']))
>
> How about letting me initialize JavaSet with a sequence, too?
>
>>>> a = JavaSet(['foo', 'bar', 'baz'])
>>>>
>

Well, sure, but the point of JavaSet is to expose a set you own and  
control to Java. If you want to just create a set for Java the Arrays  
route works just as well and produces a faster set since its values  
are held in Java.

Andi..

> Bill

Mime
View raw message