MCPcopy Index your code
hub / github.com/apache/fory / write

Method write

python/pyfory/serializer.py:1265–1275  ·  view source on GitHub ↗
(self, write_context, value)

Source from the content-addressed store, hash-verified

1263 self.cls = cls
1264
1265 def write(self, write_context, value):
1266 module_name = value.__module__
1267 qualname = value.__qualname__
1268
1269 if module_name == "__main__" or "<locals>" in qualname:
1270 write_context.write_int8(1)
1271 self._serialize_local_class(write_context, value)
1272 return
1273 write_context.write_int8(0)
1274 write_context.write_string(module_name)
1275 write_context.write_string(qualname)
1276
1277 def read(self, read_context):
1278 class_type = read_context.read_int8()

Callers

nothing calls this directly

Calls 3

write_int8Method · 0.45
write_stringMethod · 0.45

Tested by

no test coverage detected