[pylucene-dev] Invalid Names in JCC lucene

Andi Vajda vajda at osafoundation.org
Wed Nov 14 10:02:24 PST 2007


On Wed, 14 Nov 2007, Pete wrote:

> Busy day for me...
>
> It looks like JCC is including generating some type names that aren't valid
> python, such as Field$Index and Field$Store. These appear to be inner
> classes, where $ is used as a separtor.  While this doesn't seem to be
> causing any problems, you can't actually refer to the name in a source
> file/type it at a shell prompt (the $ generates a SyntaxError), which just
> feels kinda weird.

Yes, you can. Use Field.Index or Field.Store, these Index and Store classes 
are inner classes to the Field class.

They are named Field$Index or Field$Store because that's the way Java names 
inner classes. Sure, I could rename them, but why ? You can use Field.Store 
or Field.Index already. In what situation are you faced with having to deal 
with Field$Index ?

Andi..


More information about the pylucene-dev mailing list