[pylucene-dev] Invalid Names in JCC lucene
Pete
pfein at pobox.com
Wed Nov 14 10:18:28 PST 2007
On Wednesday November 14 2007 1:02:24 pm Andi Vajda wrote:
> 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.
I noted that in one of my solutions.
> 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 ?
I don't, it just was one of the auto-complete options in my shell (ipython)
and it SyntaxError'd me when I tried to use it. As I said, it's not really a
problem, it's just weird to have a name you can't type. Since my complaint's
aesthetic, nevermind...
--
Peter Fein || 773-575-0694 || pfein at pobox.com
http://www.pobox.com/~pfein/ || PGP: 0xCCF6AE6B
irc: pfein at freenode.net || jabber: peter.fein at gmail.com
More information about the pylucene-dev
mailing list