{
    "content": [
        {
            "type": "text",
            "text": "# weakref (pydoc)\n\n**Summary:** weakref - Weak reference support for Python.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **DESCRIPTION** (4 lines)\n- **CLASSES** (11 lines) — 8 subsections\n  - class CallableProxyType (211 lines)\n  - class ProxyType (212 lines)\n  - class ReferenceType (49 lines)\n  - class WeakKeyDictionary (145 lines)\n  - class WeakMethod (68 lines)\n  - class WeakSet (104 lines)\n  - class WeakValueDictionary (150 lines)\n  - class finalize (96 lines)\n- **FUNCTIONS** (1 lines) — 3 subsections\n  - getweakrefcount (2 lines)\n  - getweakrefs (3 lines)\n  - proxy (4 lines)\n- **DATA** (3 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nweakref - Weak reference support for Python.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/weakref.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### DESCRIPTION\n\nThis module is an implementation of PEP 205:\n\nhttps://www.python.org/dev/peps/pep-0205/\n\n### CLASSES\n\nbuiltins.object\nweakrefset.WeakSet\nCallableProxyType\nProxyType\nReferenceType\nWeakMethod\nfinalize\ncollections.abc.MutableMapping(collections.abc.Mapping)\nWeakKeyDictionary\nWeakValueDictionary\n\n#### class CallableProxyType\n\n|  Methods defined here:\n|\n|  abs(self, /)\n|      abs(self)\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  and(self, value, /)\n|      Return self&value.\n|\n|  bool(self, /)\n|      True if self else False\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  contains(self, key, /)\n|      Return key in self.\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  delitem(self, key, /)\n|      Delete self[key].\n|\n|  divmod(self, value, /)\n|      Return divmod(self, value).\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  float(self, /)\n|      float(self)\n|\n|  floordiv(self, value, /)\n|      Return self//value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(self, key, /)\n|      Return self[key].\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  iadd(self, value, /)\n|      Return self+=value.\n|\n|  iand(self, value, /)\n|      Return self&=value.\n|\n|  ifloordiv(self, value, /)\n|      Return self//=value.\n|\n|  ilshift(self, value, /)\n|      Return self<<=value.\n|\n|  imatmul(self, value, /)\n|      Return self@=value.\n|\n|  imod(self, value, /)\n|      Return self%=value.\n|\n|  imul(self, value, /)\n|      Return self*=value.\n|\n|  index(self, /)\n|      Return self converted to an integer, if self is suitable for use as an index into a list.\n|\n|  int(self, /)\n|      int(self)\n|\n|  invert(self, /)\n|      ~self\n|\n|  ior(self, value, /)\n|      Return self|=value.\n|\n|  ipow(self, value, /)\n|      Return self=value.\n|\n|  irshift(self, value, /)\n|      Return self>>=value.\n|\n|  isub(self, value, /)\n|      Return self-=value.\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  itruediv(self, value, /)\n|      Return self/=value.\n|\n|  ixor(self, value, /)\n|      Return self^=value.\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lshift(self, value, /)\n|      Return self<<value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  matmul(self, value, /)\n|      Return self@value.\n|\n|  mod(self, value, /)\n|      Return self%value.\n|\n|  mul(self, value, /)\n|      Return self*value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  neg(self, /)\n|      -self\n|\n|  next(self, /)\n|      Implement next(self).\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  pos(self, /)\n|      +self\n|\n|  pow(self, value, mod=None, /)\n|      Return pow(self, value, mod).\n|\n|  radd(self, value, /)\n|      Return value+self.\n|\n|  rand(self, value, /)\n|      Return value&self.\n|\n|  rdivmod(self, value, /)\n|      Return divmod(value, self).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  rfloordiv(self, value, /)\n|      Return value//self.\n|\n|  rlshift(self, value, /)\n|      Return value<<self.\n|\n|  rmatmul(self, value, /)\n|      Return value@self.\n|\n|  rmod(self, value, /)\n|      Return value%self.\n|\n|  rmul(self, value, /)\n|      Return value*self.\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  rpow(self, value, mod=None, /)\n|      Return pow(value, self, mod).\n|\n|  rrshift(self, value, /)\n|      Return value>>self.\n|\n|  rshift(self, value, /)\n|      Return self>>value.\n|\n|  rsub(self, value, /)\n|      Return value-self.\n|\n|  rtruediv(self, value, /)\n|      Return value/self.\n|\n|  rxor(self, value, /)\n|      Return value^self.\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setitem(self, key, value, /)\n|      Set self[key] to value.\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  sub(self, value, /)\n|      Return self-value.\n|\n|  truediv(self, value, /)\n|      Return self/value.\n|\n|  xor(self, value, /)\n|      Return self^value.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n\n#### class ProxyType\n\n|  Methods defined here:\n|\n|  abs(self, /)\n|      abs(self)\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  and(self, value, /)\n|      Return self&value.\n|\n|  bool(self, /)\n|      True if self else False\n|\n|  bytes(...)\n|\n|  contains(self, key, /)\n|      Return key in self.\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  delitem(self, key, /)\n|      Delete self[key].\n|\n|  divmod(self, value, /)\n|      Return divmod(self, value).\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  float(self, /)\n|      float(self)\n|\n|  floordiv(self, value, /)\n|      Return self//value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(self, key, /)\n|      Return self[key].\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  iadd(self, value, /)\n|      Return self+=value.\n|\n|  iand(self, value, /)\n|      Return self&=value.\n|\n|  ifloordiv(self, value, /)\n|      Return self//=value.\n|\n|  ilshift(self, value, /)\n|      Return self<<=value.\n|\n|  imatmul(self, value, /)\n|      Return self@=value.\n|\n|  imod(self, value, /)\n|      Return self%=value.\n|\n|  imul(self, value, /)\n|      Return self*=value.\n|\n|  index(self, /)\n|      Return self converted to an integer, if self is suitable for use as an index into a list.\n|\n|  int(self, /)\n|      int(self)\n|\n|  invert(self, /)\n|      ~self\n|\n|  ior(self, value, /)\n|      Return self|=value.\n|\n|  ipow(self, value, /)\n|      Return self=value.\n|\n|  irshift(self, value, /)\n|      Return self>>=value.\n|\n|  isub(self, value, /)\n|      Return self-=value.\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  itruediv(self, value, /)\n|      Return self/=value.\n|\n|  ixor(self, value, /)\n|      Return self^=value.\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lshift(self, value, /)\n|      Return self<<value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  matmul(self, value, /)\n|      Return self@value.\n|\n|  mod(self, value, /)\n|      Return self%value.\n|\n|  mul(self, value, /)\n|      Return self*value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  neg(self, /)\n|      -self\n|\n|  next(self, /)\n|      Implement next(self).\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  pos(self, /)\n|      +self\n|\n|  pow(self, value, mod=None, /)\n|      Return pow(self, value, mod).\n|\n|  radd(self, value, /)\n|      Return value+self.\n|\n|  rand(self, value, /)\n|      Return value&self.\n|\n|  rdivmod(self, value, /)\n|      Return divmod(value, self).\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  reversed(...)\n|\n|  rfloordiv(self, value, /)\n|      Return value//self.\n|\n|  rlshift(self, value, /)\n|      Return value<<self.\n|\n|  rmatmul(self, value, /)\n|      Return value@self.\n|\n|  rmod(self, value, /)\n|      Return value%self.\n|\n|  rmul(self, value, /)\n|      Return value*self.\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  rpow(self, value, mod=None, /)\n|      Return pow(value, self, mod).\n|\n|  rrshift(self, value, /)\n|      Return value>>self.\n|\n|  rshift(self, value, /)\n|      Return self>>value.\n|\n|  rsub(self, value, /)\n|      Return value-self.\n|\n|  rtruediv(self, value, /)\n|      Return value/self.\n|\n|  rxor(self, value, /)\n|      Return value^self.\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setitem(self, key, value, /)\n|      Set self[key] to value.\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  sub(self, value, /)\n|      Return self-value.\n|\n|  truediv(self, value, /)\n|      Return self/value.\n|\n|  xor(self, value, /)\n|      Return self^value.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n\n#### class ReferenceType\n\n|  Methods defined here:\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  callback\n\n#### class WeakKeyDictionary\n\n|  WeakKeyDictionary(dict=None)\n|\n|  Mapping class that references keys weakly.\n|\n|  Entries in the dictionary will be discarded when there is no\n|  longer a strong reference to the key. This can be used to\n|  associate additional data with an object owned by other parts of\n|  an application without adding attributes to those objects. This\n|  can be especially useful with objects that override attribute\n|  accesses.\n|\n|  Method resolution order:\n|      WeakKeyDictionary\n|      collections.abc.MutableMapping\n|      collections.abc.Mapping\n|      collections.abc.Collection\n|      collections.abc.Sized\n|      collections.abc.Iterable\n|      collections.abc.Container\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  contains(self, key)\n|\n|  copy = copy(self)\n|\n|  deepcopy(self, memo)\n|\n|  delitem(self, key)\n|\n|  getitem(self, key)\n|\n|  init(self, dict=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ior(self, other)\n|\n|  iter = keys(self)\n|\n|  len(self)\n|\n|  or(self, other)\n|      Return self|value.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ror(self, other)\n|      Return value|self.\n|\n|  setitem(self, key, value)\n|\n|  copy(self)\n|\n|  get(self, key, default=None)\n|      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.\n|\n|  items(self)\n|      D.items() -> a set-like object providing a view on D's items\n|\n|  keyrefs(self)\n|      Return a list of weak references to the keys.\n|\n|      The references are not guaranteed to be 'live' at the time\n|      they are used, so the result of calling the references needs\n|      to be checked before being used.  This can be used to avoid\n|      creating references that will cause the garbage collector to\n|      keep the keys around longer than needed.\n|\n|  keys(self)\n|      D.keys() -> a set-like object providing a view on D's keys\n|\n|  pop(self, key, *args)\n|      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n|      If key is not found, d is returned if given, otherwise KeyError is raised.\n|\n|  popitem(self)\n|      D.popitem() -> (k, v), remove and return some (key, value) pair\n|      as a 2-tuple; but raise KeyError if D is empty.\n|\n|  setdefault(self, key, default=None)\n|      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D\n|\n|  update(self, dict=None, /, kwargs)\n|      D.update([E, ]F) -> None.  Update D from mapping/iterable E and F.\n|      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]\n|      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v\n|      In either case, this is followed by: for k, v in F.items(): D[k] = v\n|\n|  values(self)\n|      D.values() -> an object providing a view on D's values\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from collections.abc.MutableMapping:\n|\n|  clear(self)\n|      D.clear() -> None.  Remove all items from D.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from collections.abc.Mapping:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from collections.abc.Mapping:\n|\n|  hash = None\n|\n|  reversed = None\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from collections.abc.Collection:\n|\n|  subclasshook(C) from abc.ABCMeta\n|      Abstract classes can override this to customize issubclass().\n|\n|      This is invoked early on by abc.ABCMeta.subclasscheck().\n|      It should return True, False or NotImplemented.  If it returns\n|      NotImplemented, the normal algorithm is used.  Otherwise, it\n|      overrides the normal algorithm (and the outcome is cached).\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from collections.abc.Iterable:\n|\n|  classgetitem = GenericAlias(...) from abc.ABCMeta\n|      Represent a PEP 585 generic type\n|\n|      E.g. for t = list[int], t.origin is list and t.args is (int,).\n\n#### class WeakMethod\n\n|  WeakMethod(meth, callback=None)\n|\n|  A custom `weakref.ref` subclass which simulates a weak reference to\n|  a bound method, working around the lifetime problem of bound methods.\n|\n|  Method resolution order:\n|      WeakMethod\n|      ReferenceType\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  call(self)\n|      Call self as a function.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  ne(self, other)\n|      Return self!=value.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(cls, meth, callback=None)\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from ReferenceType:\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from ReferenceType:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ReferenceType:\n|\n|  callback\n\n#### class WeakSet\n\n|  WeakSet(data=None)\n|\n|  Methods defined here:\n|\n|  and = intersection(self, other)\n|\n|  contains(self, item)\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  ge = issuperset(self, other)\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  iand(self, other)\n|\n|  init(self, data=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ior(self, other)\n|\n|  isub(self, other)\n|\n|  iter(self)\n|\n|  ixor(self, other)\n|\n|  le = issubset(self, other)\n|\n|  len(self)\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  or = union(self, other)\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  sub = difference(self, other)\n|\n|  xor = symmetricdifference(self, other)\n|\n|  add(self, item)\n|\n|  clear(self)\n|\n|  copy(self)\n|\n|  difference(self, other)\n|\n|  differenceupdate(self, other)\n|\n|  discard(self, item)\n|\n|  intersection(self, other)\n|\n|  intersectionupdate(self, other)\n|\n|  isdisjoint(self, other)\n|\n|  issubset(self, other)\n|\n|  issuperset(self, other)\n|\n|  pop(self)\n|\n|  remove(self, item)\n|\n|  symmetricdifference(self, other)\n|\n|  symmetricdifferenceupdate(self, other)\n|\n|  union(self, other)\n|\n|  update(self, other)\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  classgetitem = GenericAlias(...) from builtins.type\n|      Represent a PEP 585 generic type\n|\n|      E.g. for t = list[int], t.origin is list and t.args is (int,).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n\n#### class WeakValueDictionary\n\n|  WeakValueDictionary(other=(), /, kw)\n|\n|  Mapping class that references values weakly.\n|\n|  Entries in the dictionary will be discarded when no strong\n|  reference to the value exists anymore\n|\n|  Method resolution order:\n|      WeakValueDictionary\n|      collections.abc.MutableMapping\n|      collections.abc.Mapping\n|      collections.abc.Collection\n|      collections.abc.Sized\n|      collections.abc.Iterable\n|      collections.abc.Container\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  contains(self, key)\n|\n|  copy = copy(self)\n|\n|  deepcopy(self, memo)\n|\n|  delitem(self, key)\n|\n|  getitem(self, key)\n|\n|  init(self, other=(), /, kw)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ior(self, other)\n|\n|  iter = keys(self)\n|\n|  len(self)\n|\n|  or(self, other)\n|      Return self|value.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ror(self, other)\n|      Return value|self.\n|\n|  setitem(self, key, value)\n|\n|  copy(self)\n|\n|  get(self, key, default=None)\n|      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.\n|\n|  items(self)\n|      D.items() -> a set-like object providing a view on D's items\n|\n|  itervaluerefs(self)\n|      Return an iterator that yields the weak references to the values.\n|\n|      The references are not guaranteed to be 'live' at the time\n|      they are used, so the result of calling the references needs\n|      to be checked before being used.  This can be used to avoid\n|      creating references that will cause the garbage collector to\n|      keep the values around longer than needed.\n|\n|  keys(self)\n|      D.keys() -> a set-like object providing a view on D's keys\n|\n|  pop(self, key, *args)\n|      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n|      If key is not found, d is returned if given, otherwise KeyError is raised.\n|\n|  popitem(self)\n|      D.popitem() -> (k, v), remove and return some (key, value) pair\n|      as a 2-tuple; but raise KeyError if D is empty.\n|\n|  setdefault(self, key, default=None)\n|      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D\n|\n|  update(self, other=None, /, kwargs)\n|      D.update([E, ]F) -> None.  Update D from mapping/iterable E and F.\n|      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]\n|      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v\n|      In either case, this is followed by: for k, v in F.items(): D[k] = v\n|\n|  valuerefs(self)\n|      Return a list of weak references to the values.\n|\n|      The references are not guaranteed to be 'live' at the time\n|      they are used, so the result of calling the references needs\n|      to be checked before being used.  This can be used to avoid\n|      creating references that will cause the garbage collector to\n|      keep the values around longer than needed.\n|\n|  values(self)\n|      D.values() -> an object providing a view on D's values\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from collections.abc.MutableMapping:\n|\n|  clear(self)\n|      D.clear() -> None.  Remove all items from D.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from collections.abc.Mapping:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from collections.abc.Mapping:\n|\n|  hash = None\n|\n|  reversed = None\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from collections.abc.Collection:\n|\n|  subclasshook(C) from abc.ABCMeta\n|      Abstract classes can override this to customize issubclass().\n|\n|      This is invoked early on by abc.ABCMeta.subclasscheck().\n|      It should return True, False or NotImplemented.  If it returns\n|      NotImplemented, the normal algorithm is used.  Otherwise, it\n|      overrides the normal algorithm (and the outcome is cached).\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from collections.abc.Iterable:\n|\n|  classgetitem = GenericAlias(...) from abc.ABCMeta\n|      Represent a PEP 585 generic type\n|\n|      E.g. for t = list[int], t.origin is list and t.args is (int,).\n\n#### class finalize\n\n|  finalize(obj, func, /, *args, kwargs)\n|\n|  Class for finalization of weakrefable objects\n|\n|  finalize(obj, func, *args, kwargs) returns a callable finalizer\n|  object which will be called when obj is garbage collected. The\n|  first time the finalizer is called it evaluates func(*arg, kwargs)\n|  and returns the result. After this the finalizer is dead, and\n|  calling it just returns None.\n|\n|  When the program exits any remaining finalizers for which the\n|  atexit attribute is true will be run in reverse order of creation.\n|  By default atexit is true.\n|\n|  Methods defined here:\n|\n|  call(self, =None)\n|      If alive then mark as dead and return func(*args, kwargs);\n|      otherwise return None\n|\n|  init(self, obj, func, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  detach(self)\n|      If alive then mark as dead and return (obj, func, args, kwargs);\n|      otherwise return None\n|\n|  peek(self)\n|      If alive then return (obj, func, args, kwargs);\n|      otherwise return None\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  alive\n|      Whether finalizer is alive\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  atexit\n|      Whether finalizer should be called at exit\n\nref = class ReferenceType(builtins.object)\n|  Methods defined here:\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  callback\n\n### FUNCTIONS\n\n#### getweakrefcount\n\nReturn the number of weak references to 'object'.\n\n#### getweakrefs\n\ngetweakrefs(object) -- return a list of all weak reference objects\nthat point to 'object'.\n\n#### proxy\n\nproxy(object[, callback]) -- create a proxy object that weakly\nreferences 'object'.  'callback', if given, is called with a\nreference to the proxy when 'object' is about to be finalized.\n\n### DATA\n\nProxyTypes = (<class 'weakref.ProxyType'>, <class 'weakref.CallablePro...\nall = ['ref', 'proxy', 'getweakrefcount', 'getweakrefs', 'WeakKeyD...\n\n### FILE\n\n/usr/lib/python3.10/weakref.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "weakref",
        "section": "",
        "mode": "pydoc",
        "summary": "weakref - Weak reference support for Python.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 11,
                "subsections": [
                    {
                        "name": "class CallableProxyType",
                        "lines": 211
                    },
                    {
                        "name": "class ProxyType",
                        "lines": 212
                    },
                    {
                        "name": "class ReferenceType",
                        "lines": 49
                    },
                    {
                        "name": "class WeakKeyDictionary",
                        "lines": 145
                    },
                    {
                        "name": "class WeakMethod",
                        "lines": 68
                    },
                    {
                        "name": "class WeakSet",
                        "lines": 104
                    },
                    {
                        "name": "class WeakValueDictionary",
                        "lines": 150
                    },
                    {
                        "name": "class finalize",
                        "lines": 96
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "getweakrefcount",
                        "lines": 2
                    },
                    {
                        "name": "getweakrefs",
                        "lines": 3
                    },
                    {
                        "name": "proxy",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}