MCPcopy Create free account
hub / github.com/PyTables/PyTables / __init__

Method __init__

tables/file.py:372–388  ·  view source on GitHub ↗
(self, nslots: int = 64, node_factory=None)

Source from the content-addressed store, hash-verified

370 """Node manager."""
371
372 def __init__(self, nslots: int = 64, node_factory=None) -> None:
373 super().__init__()
374
375 self.registry = weakref.WeakValueDictionary()
376
377 if nslots > 0:
378 cache = lrucacheextension.NodeCache(nslots)
379 elif nslots == 0:
380 cache = _NoCache()
381 else:
382 # nslots < 0
383 cache = _DictCache(-nslots)
384
385 self.cache = cache
386
387 # node_factory(node_path)
388 self.node_factory = node_factory
389
390 def register_node(self, node: Node, key: str | None) -> None:
391 """Register a node."""

Callers

nothing calls this directly

Calls 3

_NoCacheClass · 0.85
_DictCacheClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected