Unnamed
public text v1 · immutablefrom simplegeneric import generic
@generic
def serialize(typeinfo, value):
"""Serialize a value based on typeinfo"""
raise NotImplementedError("Unrecognized type:", typeinfo)
@serialize.when_type(IntegerType):
def serialize_int(typeinfo, value):
return str(value)