TP0233
Error: can’t be used in a native program (M23)
Messages
Section titled “Messages”a native program can't use Python, with helpbuild it without '--native''<T>.<m>' can't be used in a native program: <message>(M23)a Python extension can't use Python interop itself(M25)an extension module can only pass Python objects along, with helpdo this in Python, and pass the result(M45)
Example
Section titled “Example”From the golden case tests/cases/m25/tp0233_extension.tpn:
# An extension module runs natively, so it can't use Python interop itself (SPEC §17.1).from python import json
def dump(n: int) -> str: return json.dumps(n) as strThe compiler reports:
tp0233_extension.tpn:2:1: error TP0233: a Python extension can't use Python interop itselfThe specification lists every code.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.