Internals
Documentation for the internals of CodeSearch. The content on this page is not a part of the public API and isn't intended for most users. It's all subject to change in non-breaking versions.
CodeSearch.gen_wildcard — Function
gen_wildcard(str, prefix="wildcard")return a string starting with prefix that is not in str
CodeSearch.prepare_wildcards — Function
prepare_wildcards(str) -> (new_str, wildcard_str)Replace * with an identifier that does not occur in str (preferrably "wildcard") and return the new string and the identifier. * may be escaped, and the new identifier is padded with spaces only when necessary to prevent it from parsing together with characters before or after it.