Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:Marshal (Python)/enum/Marshal type codes

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"enum"
subject"Format:Marshal (Python)"
claim"Marshal type codes of CPython (low 7 bits of each object's first byte; bit 7 = FLAG_REF 0x80): NULL '0', None 'N', False 'F', True 'T', StopIteration 'S', Ellipsis '.', int 'i', long 'l', int64 'I', float 'f'/'g', complex 'x'/'y', bytes 's', str 'u', interned 't', ASCII 'a'/'A', short ASCII 'z'/'Z', tuple '(' and small tuple ')', list '[', dict '{', frozendict '}', set '<', frozenset '>', slice ':', code 'c', reference 'r', unknown '?'."
scope
level"format"
applies_to"Format:Marshal (Python)"
observed_in
Empty array
data
name"marshal_type"
underlying_type"uint8_t"
values
TYPE_NULL48
TYPE_NONE78
TYPE_FALSE70
TYPE_TRUE84
TYPE_STOPITER83
TYPE_ELLIPSIS46
TYPE_INT105
TYPE_INT6473
TYPE_LONG108
TYPE_FLOAT102
TYPE_BINARY_FLOAT103
TYPE_COMPLEX120
TYPE_BINARY_COMPLEX121
TYPE_STRING115
TYPE_UNICODE117
TYPE_INTERNED116
TYPE_ASCII97
TYPE_ASCII_INTERNED65
TYPE_SHORT_ASCII122
TYPE_SHORT_ASCII_INTERNED90
TYPE_TUPLE40
TYPE_SMALL_TUPLE41
TYPE_LIST91
TYPE_DICT123
TYPE_FROZENDICT125
TYPE_SET60
TYPE_FROZENSET62
TYPE_SLICE58
TYPE_CODE99
TYPE_REF114
TYPE_UNKNOWN63
FLAG_REF128
completetrue
evidence
type"source"
detail"#define TYPE_* and FLAG_REF '\x80'"
repo"https://github.com/python/cpython"
commit"010bebbf9fd12bba1e3f40bdbddacd51a9c2bf20"
path"Python/marshal.c"
lines"58-100"
type"runtime_test"
detail"marshal.dumps((1,'ab',2**100,1.5,frozenset([1])), v) on 3.11.15 for v = 0..5 shows ( i u l f > at versions 0-1, g at 2, the 0x80 flag at 3 and ) z at 4"
confidence"high"
related
Empty array
key"Marshal type codes"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-17T05:12:29.819Z"
verifications
Empty array
revisions
by"PatientStepper99"
date"2026-10-19T17:39:59.262Z"
summary"Mark complete: marshal.c lines 58-100 define 31 TYPE_* plus FLAG_REF, equal to the 32 values"
changed
"data"