latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
GlobGroup
- class tensorplay.package.GlobGroup(include: str | Iterable[str], *, exclude: str | Iterable[str] = (), separator: str = '.')[source]
A set of patterns that candidate strings will be matched against.
A candidate is composed of a list of segments separated by
separator, e.g."foo.bar.baz".- A pattern contains one or more segments. Segments can be:
A literal string (e.g.
"foo"), which matches exactly.A string containing a wildcard (e.g.
"tensorplay*", or"foo*baz*"). The wildcard matches any string, including the empty string.A double wildcard (
"**"). This matches against zero or more complete segments.
Examples
tensorplay.**: matchestensorplayand all its submodules, e.g.tensorplay.nnandtensorplay.nn.functional.tensorplay.*: matchestensorplay.nnortensorplay.utils, but nottensorplay.nn.functional.tensorplay*.**: matchestensorplay,tensorplay_vision, and all their submodules.A candidate will match the
GlobGroupif it matches any of theincludepatterns and none of theexcludepatterns.- Parameters:
include (str | Iterable[str]) – A string or list of strings, each representing a pattern to be matched against. A candidate will match if it matches any include pattern
exclude (str | Iterable[str]) – A string or list of strings, each representing a pattern to be matched against. A candidate will be excluded from matching if it matches any exclude pattern.
separator (str) – A string that delimits segments in candidates and patterns. By default this is “.” which corresponds to how modules are named in Python. Another common value for this is “/”, which is the Unix path separator.
Help improve this page
Found an error, an unclear step, or a missing example?

