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 | |
|---|
|
|---|
| data | | name | "marshal_type" |
|---|
| underlying_type | "uint8_t" |
|---|
| values | | TYPE_NULL | 48 |
|---|
| TYPE_NONE | 78 |
|---|
| TYPE_FALSE | 70 |
|---|
| TYPE_TRUE | 84 |
|---|
| TYPE_STOPITER | 83 |
|---|
| TYPE_ELLIPSIS | 46 |
|---|
| TYPE_INT | 105 |
|---|
| TYPE_INT64 | 73 |
|---|
| TYPE_LONG | 108 |
|---|
| TYPE_FLOAT | 102 |
|---|
| TYPE_BINARY_FLOAT | 103 |
|---|
| TYPE_COMPLEX | 120 |
|---|
| TYPE_BINARY_COMPLEX | 121 |
|---|
| TYPE_STRING | 115 |
|---|
| TYPE_UNICODE | 117 |
|---|
| TYPE_INTERNED | 116 |
|---|
| TYPE_ASCII | 97 |
|---|
| TYPE_ASCII_INTERNED | 65 |
|---|
| TYPE_SHORT_ASCII | 122 |
|---|
| TYPE_SHORT_ASCII_INTERNED | 90 |
|---|
| TYPE_TUPLE | 40 |
|---|
| TYPE_SMALL_TUPLE | 41 |
|---|
| TYPE_LIST | 91 |
|---|
| TYPE_DICT | 123 |
|---|
| TYPE_FROZENDICT | 125 |
|---|
| TYPE_SET | 60 |
|---|
| TYPE_FROZENSET | 62 |
|---|
| TYPE_SLICE | 58 |
|---|
| TYPE_CODE | 99 |
|---|
| TYPE_REF | 114 |
|---|
| TYPE_UNKNOWN | 63 |
|---|
| FLAG_REF | 128 |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| 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 | |
|---|
| key | "Marshal type codes" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:12:29.819Z" |
|---|
| verifications | |
|---|
| 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 | |
|---|
|
|
|---|