On this page
  1. sys.getunicodeinternedsize
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

sys.getunicodeinternedsize

Prev: sys.gettrace | Up: sys | Next: sys.intern
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.getunicodeinternedsize
Tags: #public #python3 #stdlib #sys


Import

import sys
from sys import getunicodeinternedsize

Signature & Overview

sys.getunicodeinternedsize(*, _only_immortal=False)

Return the number of elements of the unicode interned dictionary

Usage

import sys

# Python 3.12+: returns total memory (in bytes) used by interned Unicode strings
assert hasattr(sys, "getunicodeinternedsize")

Gotchas

REPL Inspect

from sys import getunicodeinternedsize
help(getunicodeinternedsize)

Linked from

Related notes