MCPcopy
hub / github.com/dask/dask / literal

Class literal

dask/core.py:504–519  ·  view source on GitHub ↗

A small serializable object to wrap literal values without copying

Source from the content-addressed store, hash-verified

502
503
504class literal:
505 """A small serializable object to wrap literal values without copying"""
506
507 __slots__ = ("data",)
508
509 def __init__(self, data):
510 self.data = data
511
512 def __repr__(self):
513 return f"literal<type={type(self.data).__name__}>"
514
515 def __reduce__(self):
516 return (literal, (self.data,))
517
518 def __call__(self):
519 return self.data
520
521
522def quote(x):

Callers 3

test_tokenize_literalFunction · 0.90
quoteFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_tokenize_literalFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…