MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / intern

Method intern

lib/sqlalchemy/orm/path_registry.py:426–431  ·  view source on GitHub ↗
(cls, strvalue: str)

Source from the content-addressed store, hash-verified

424
425 @classmethod
426 def intern(cls, strvalue: str) -> PathToken:
427 if strvalue in cls._intern:
428 return cls._intern[strvalue]
429 else:
430 cls._intern[strvalue] = result = PathToken(strvalue)
431 return result
432
433
434class _TokenRegistry(PathRegistry):

Callers 3

__init__Method · 0.80
test_slice_tokenMethod · 0.80

Calls 1

PathTokenClass · 0.85

Tested by 2

test_slice_tokenMethod · 0.64