TensorPlay
latest (dev)
Copy
View Markdown

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.**: matches tensorplay and all its submodules, e.g. tensorplay.nn and tensorplay.nn.functional. tensorplay.*: matches tensorplay.nn or tensorplay.utils, but not tensorplay.nn.functional. tensorplay*.**: matches tensorplay, tensorplay_vision, and all their submodules.

A candidate will match the GlobGroup if it matches any of the include patterns and none of the exclude patterns.

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.

On this page

Ask DeepWiki