search engine: first draft of code and also (slightly desynchronized) chapter text!

I wrote it this way in order to better explore the parallelism within groups of definitions, to make the differences within each group (the real content of the definitions) stand out visually; this could be improved with further vertical alignment. I do consider it "acceptable Python", but it's also clearly "nontraditional Python". I think traditional Python would be slightly less readable to me (needlessly obscuring the unavoidable parallelism between the definitions), but readability is subjective, or at least context-dependent — what one group of people finds more readable, another might find less readable.

If the overall opinion of reviewers is that the readability benefit of tabular formatting here is minimal or even negative, I wouldn't be unhappy to format this in the traditional way.