NamePattern

attribute.NamePattern(self, strata, module, id)

A name with a strata, module, and attribute ID that allows wildcards (*) so it can act as a pattern to match against AbsoluteNames.

Methods

Name Description
match Test this pattern to see if it matches the given AbsoluteName or NamePattern. The ability to match against NamePatterns is useful to see if two patterns conflict with each other and would create ambiguity.
of Coerce the given value to a NamePattern. If it’s already a NamePattern, return it; if it’s a string, parse it.
parse Parse a pattern from a ::-delimited string. As a shorthand, you can omit preceding wildcard segments and they will be automatically filled in, e.g., “a” will become “::::a” and “a::b” will become “*::a::b”.