On this page
symtable.SymbolTableType
Prev: symtable.SymbolTable | Up: symtable | Next: symtable.symtable
Rel: symtable.Class, symtable.Function, symtable.Symbol, symtable.SymbolTable
Ref: docs.python.org — symtable.SymbolTableType
Tags: #public #python3 #stdlib #symtable
Import
import symtable
from symtable import SymbolTableType
Signature & Overview
symtable.SymbolTableType(*values)
symtable.SymbolTableType class.
Methods & Attributes
SymbolTableType.capitalize(self, /)— Return a capitalized version of the string.SymbolTableType.casefold(self, /)— Return a version of the string suitable for caseless comparisons.SymbolTableType.center(self, width, fillchar=' ', /)— Return a centered string of length width.SymbolTableType.count(...)— Return the number of non-overlapping occurrences of substring sub in string S[start:end].SymbolTableType.encode(self, /, encoding='utf-8', errors='strict')— Encode the string using the codec registered for encoding.SymbolTableType.endswith(...)— Return True if the string ends with the specified suffix, False otherwise.SymbolTableType.expandtabs(self, /, tabsize=8)— Return a copy where all tab characters are expanded using spaces.SymbolTableType.find(...)— Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].SymbolTableType.format(self, /, *args, **kwargs)— Return a formatted version of the string, using substitutions from args and kwargs.SymbolTableType.format_map(self, mapping, /)— Return a formatted version of the string, using substitutions from mapping.SymbolTableType.index(...)— Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].SymbolTableType.isalnum(self, /)— Return True if the string is an alpha-numeric string, False otherwise.SymbolTableType.isalpha(self, /)— Return True if the string is an alphabetic string, False otherwise.SymbolTableType.isascii(self, /)— Return True if all characters in the string are ASCII, False otherwise.SymbolTableType.isdecimal(self, /)— Return True if the string is a decimal string, False otherwise.SymbolTableType.isdigit(self, /)— Return True if the string is a digit string, False otherwise.SymbolTableType.isidentifier(self, /)— Return True if the string is a valid Python identifier, False otherwise.SymbolTableType.islower(self, /)— Return True if the string is a lowercase string, False otherwise.SymbolTableType.isnumeric(self, /)— Return True if the string is a numeric string, False otherwise.SymbolTableType.isprintable(self, /)— Return True if all characters in the string are printable, False otherwise.SymbolTableType.isspace(self, /)— Return True if the string is a whitespace string, False otherwise.SymbolTableType.istitle(self, /)— Return True if the string is a title-cased string, False otherwise.SymbolTableType.isupper(self, /)— Return True if the string is an uppercase string, False otherwise.SymbolTableType.join(self, iterable, /)— Concatenate any number of strings.SymbolTableType.ljust(self, width, fillchar=' ', /)— Return a left-justified string of length width.SymbolTableType.lower(self, /)— Return a copy of the string converted to lowercase.SymbolTableType.lstrip(self, chars=None, /)— Return a copy of the string with leading whitespace removed.SymbolTableType.maketrans(...)— Return a translation table usable for str.translate().SymbolTableType.partition(self, sep, /)— Partition the string into three parts using the given separator.SymbolTableType.removeprefix(self, prefix, /)— Return a str with the given prefix string removed if present.SymbolTableType.removesuffix(self, suffix, /)— Return a str with the given suffix string removed if present.SymbolTableType.replace(self, old, new, /, count=-1)— Return a copy with all occurrences of substring old replaced by new.SymbolTableType.rfind(...)— Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].SymbolTableType.rindex(...)— Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].SymbolTableType.rjust(self, width, fillchar=' ', /)— Return a right-justified string of length width.SymbolTableType.rpartition(self, sep, /)— Partition the string into three parts using the given separator.SymbolTableType.rsplit(self, /, sep=None, maxsplit=-1)— Return a list of the substrings in the string, using sep as the separator string.SymbolTableType.rstrip(self, chars=None, /)— Return a copy of the string with trailing whitespace removed.SymbolTableType.split(self, /, sep=None, maxsplit=-1)— Return a list of the substrings in the string, using sep as the separator string.SymbolTableType.splitlines(self, /, keepends=False)— Return a list of the lines in the string, breaking at line boundaries.
Usage
import symtable
if hasattr(symtable, 'SymbolTableType'):
assert symtable.SymbolTableType.FUNCTION == 'function'
Gotchas
- Requires Python 3.13+ (
StrEnum): Values are'module','function','class','annotation','type alias','type parameter'.
REPL Inspect
from symtable import SymbolTableType
help(SymbolTableType)
Linked from
Related notes
- tuts/python3/stdlib_module/symtable/Class Linked here; links to this page; shared tags: #stdlib, #symtable
- tuts/python3/stdlib_module/symtable/Function Linked here; links to this page; shared tags: #stdlib, #symtable
- tuts/python3/stdlib_module/symtable/Symbol Linked here; links to this page; shared tags: #stdlib, #symtable
- tuts/python3/stdlib_module/symtable/SymbolTable Linked here; links to this page; shared tags: #stdlib, #symtable
- tuts/python3/stdlib_module/symtable/symtable Linked here; links to this page; shared tags: #stdlib, #symtable
- tuts/python3/stdlib_module/symtable links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib