Export to GitHub

esmre - issue #7

No acceleration when using alternation operator


Posted on Mar 3, 2008 by Quick Rhino

The Index won't extract hints from expressions that use the | operator. It would be better if the object was put into the underlying esm index once for each term in the alternation. Eg. Index().enter(r'red|green|blue', 'primary') would enter 'primary' under 'red', 'green', and 'blue' in the esm index.

What steps will reproduce the problem?

>>> import esmre >>> i = esmre.Index() >>> i.enter(r"egg|bacon|sausage|spam|tomato|baked beans|lobster thermidor", ... "ingredients") >>> i.hintless_objects ['ingredients'] >>>

What is the expected output? What do you see instead?

>>> import esmre >>> i = esmre.Index() >>> i.enter(r"egg|bacon|sausage|spam|tomato|baked beans|lobster thermidor", ... "ingredients") >>> i.hintless_objects [] >>>

Status: Accepted

Labels:
Type-Enhancement Priority-Medium