Python's built-in functions in d/Python¶
Generated on 2026-09-12 from builtins.json
Python comes with 69 built-in functions and types, such as print, len, int and sorted. This table says, for every one of them, how much d/Python supports today and what is still missing. The rule it follows:
A partial row is not complete. Syntax, compile acceptance, named type checks and related D/OS APIs do not establish builtin behavior. Each row remains visible until fully implemented.
42 are supported in part, 27 are not yet supported, and 0 are marked complete. "In part" is the honest word even for print: it does what the Works today column says, and the Not yet column names the rest. Each name links to the official Python 3.9 documentation.
| Builtin | Status | Feature | Works today | Not yet |
|---|---|---|---|---|
__import__ |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
abs |
in part | semantics.int |
Integer and boolean absolute value | Float and custom abs protocols |
all |
in part | builtins.boolean_reductions |
Short-circuit supported iterables and truth protocols. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator protocols and complete invalid-argument translation |
any |
in part | builtins.boolean_reductions |
Short-circuit supported iterables and truth protocols. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator protocols and complete invalid-argument translation |
ascii |
in part | semantics.str |
Supported scalar, container, exception and user repr results; non-ASCII Unicode scalar escaping, unchanged ASCII bytes, builtin aliases and f-string !a conversion without a format specification | Existing repr gaps, including floats and address-bearing object/function/method representations; surrogates and format specifications remain pending. DBC string capacity limits expansion. |
bin |
in part | builtins.integer_formatting |
bin(), oct() and hex() over arbitrary signed integers and booleans, preserving standard prefixes, lowercase digits and signs; first-class builtin aliases, fixed call unpacking and round trips through int(text, base). Ordinary class index methods use inherited class-slot lookup, ignore instance-only special attributes, convert once and preserve raised exception identity. Supported non-integer returns and missing/noncallable slots produce catchable TypeError. This conversion is enabled only for bin(), oct(), hex() and chr(). | Bool-returning index methods require a DeprecationWarning adapter for the pinned CPython 3.9.6 behavior; ordinary scalar booleans remain supported. Callable-valued slots/descriptors, dynamic class changes, unsupported return representations and other custom-index consumers remain diagnosed or deferred. Invalid non-object scalar calls, full call-shape exception translation and broader builtin reflection remain pending. Output strings retain the shared DBC string and memory limits. |
bool |
in part | builtins.boolean_reductions |
Empty constructor and supported value truth protocols; captured builtin aliases, filter(bool, ...) and selected builtin type observations preserve identity after name shadowing | Complete argument-error translation and unsupported value adapters |
breakpoint |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
bytearray |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
bytes |
in part | semantics.str |
Empty constructor; bytes literals are a separate syntax feature | Encoding, integer-size, iterable and general buffer constructors |
callable |
in part | semantics.functions |
Known functions, bound user methods, named classes and ordinary supported values; first-class user/object class values; user instances test the presence of a class-level call slot, including non-callable slot values as CPython does, while instance-only fields do not make an object callable. Builtin exception class values support class identity observations. | Dynamic type/descriptor changes and other first-class builtin type values remain pending. |
chr |
in part | semantics.str |
chr() constructs one Unicode scalar from an integer or boolean, evaluates its argument once, preserves captured aliases and fixed argument expansion, and raises catchable wrong-type, signed C-int overflow and Unicode-range errors with builtin exception identity despite name shadowing. Ordinary class index methods use inherited class-slot lookup, ignore instance-only special attributes, convert once and preserve raised exception identity. Supported non-integer returns and missing/noncallable slots produce catchable TypeError. This conversion is enabled only for bin(), oct(), hex() and chr(). | Surrogate code points U+D800..U+DFFF explicitly raise NotImplementedError because the current string representation cannot preserve them; CPython accepts them, so this refusal is not conformance. Bool-returning index methods need a DeprecationWarning adapter; callable-valued slots/descriptors, dynamic class changes, unsupported return representations, broader wrong-type names and catchable argument-shape errors remain pending. C-int overflow behavior remains pinned to the macOS CPython oracle, including overflow before the Unicode range check after index conversion. |
classmethod |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
compile |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
complex |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
delattr |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
dict |
in part | semantics.mappings |
Typed pair/keyword/known mapping construction. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator protocols and dynamic key/value representations |
dir |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
divmod |
in part | semantics.int |
Two positional integer/boolean operands; an integer quotient/remainder tuple, single left-to-right argument evaluation, catchable zero division, captured callable aliases and fixed argument unpacking | Float/mixed arithmetic and custom divmod/rdivmod numeric protocols |
enumerate |
in part | semantics.iterators |
Lazy supported-source iteration, positional/keyword start and arbitrary integer counters. Ordinary class iterator sources use the same lazy enumerate adapter. | Sequence fallback, callable/sentinel iteration, callable-valued class-slot descriptors, unsupported source adapters, tagged result/default shapes and full reflection remain pending; see the iterator semantic ledger. |
eval |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
exec |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
filter |
in part | builtins.filter |
Lazy filter over existing supported iterator sources, retaining original source and predicate arguments evaluated once in order. None and supported function/closure/bound-method/callable-object/bool predicates use existing truth protocols; original items and identities are yielded. Predicate and truth errors consume that item but permit continuation. Direct next preserves the original StopIteration instance and arguments; iteration consumers and next(default) stop that iteration without closing filter. Nested wrappers retain CPython repeated exhausted zip effects. Source iterator creation is eager. Shared cursor identity, defining-module callbacks, reentrant predicates, object retention/cleanup and selected filter builtin type observations are covered by the existing executed tests. Ordinary class iterator sources preserve eager iterator acquisition and lazy predicate execution. | Remaining class-slot and length-hint protocols, mapping/view/set sources, mixed iterator item carriers, dynamic predicate rebinding, broad dynamic argument unpacking, full catchable argument-binding errors, general filter type reflection/subclassing/repr/reduce and unsupported predicate/result type-name adapters remain explicit gaps. Unknown-empty list inference keeps existing diagnostics. Terminal D/OS refusals end the run. |
float |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
format |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
frozenset |
in part | semantics.sets |
Supported homogeneous iterable conversion. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator/length-hint/hash protocols and arbitrary dynamic elements |
getattr |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
globals |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
hasattr |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
hash |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
help |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
hex |
in part | builtins.integer_formatting |
bin(), oct() and hex() over arbitrary signed integers and booleans, preserving standard prefixes, lowercase digits and signs; first-class builtin aliases, fixed call unpacking and round trips through int(text, base). Ordinary class index methods use inherited class-slot lookup, ignore instance-only special attributes, convert once and preserve raised exception identity. Supported non-integer returns and missing/noncallable slots produce catchable TypeError. This conversion is enabled only for bin(), oct(), hex() and chr(). | Bool-returning index methods require a DeprecationWarning adapter for the pinned CPython 3.9.6 behavior; ordinary scalar booleans remain supported. Callable-valued slots/descriptors, dynamic class changes, unsupported return representations and other custom-index consumers remain diagnosed or deferred. Invalid non-object scalar calls, full call-shape exception translation and broader builtin reflection remain pending. Output strings retain the shared DBC string and memory limits. |
id |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
input |
in part | builtins.input |
Console input() uses shared CONSOLE.READ_LINE_RESULT, minimum service 1.0.1.22, with the same macOS endpoint as d/BASIC. Zero or one positional prompt, existing str protocols, eager argument evaluation, exact LF removal, empty lines, CR/NUL/valid Unicode and final unterminated lines execute. Only canonical EOF raises builtin EOFError. Host/storage/version/capability refusals retain all original fields. Pending input and deferred allocation preserve one read and publish the result pair together. | GUI input producer/cancellation, configured or replaced streams, readline/history/auditing, surrogate strings, broader argument/descriptor protocols and full Python output I/O exception fidelity remain deferred. Undecodable UTF-8 raises an explicit NotImplementedError for the missing surrogateescape representation. The shared 65,535-byte string ceiling refuses larger lines instead of matching CPython unbounded input. |
int |
in part | semantics.int |
Arbitrary integers, booleans, Unicode/bytes text and explicit bases | Float and custom numeric/index protocols and buffers |
isinstance |
in part | builtins.type_checks |
Known user/builtin classes and nested alternatives; first-class user/object classes, module attributes and class values in tuples. Builtin exception class values support class identity observations and isinstance(value, type). | Other first-class builtin types, exception hierarchy and metaclass hooks |
issubclass |
in part | builtins.type_checks |
Known user/builtin classes and nested alternatives; first-class user/object classes, module attributes and class values in tuples | Other first-class builtin types, exception hierarchy and metaclass hooks |
iter |
in part | semantics.iterators |
Lazy source iterators for homogeneous lists/tuples, text, bytes and ranges; existing iterators preserve identity. Ordinary user-class iter uses inherited class-slot lookup and returns the original valid class/builtin iterator object. | Sequence fallback, callable/sentinel iteration, callable-valued class-slot descriptors, unsupported source adapters, tagged result/default shapes and full reflection remain pending; see the iterator semantic ledger. |
len |
in part | semantics.classes |
Supported containers/text/ranges and user len with result validation | Generic buffer/value adapters and complete type errors |
list |
in part | semantics.collections |
Supported iterable construction preserving references. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator/length-hint protocols and dynamically mixed element representations |
locals |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
map |
in part | builtins.map |
Lazy map over supported sources, with all argument expressions evaluated once before eager ordered iterator acquisition. Each request advances sources left to right and applies the retained callback only after every source provides an item. The shortest source stops that request; earlier inputs retain partial advancement and are probed on subsequent attempts. Functions, closures, supported builtin callbacks, bound methods, inherited callable objects and class constructors use existing typed calls. Original source/callback Python exception identity and continuation, defining-module globals, mutable sources, object results, selected builtin/type observations and shared ownership are covered by the executing focused suite. Repeated direct lists with the same concrete element carrier share iterator owner layouts while retaining independent cursors and list aliases. | Callback results must have a concrete representation inferred at construction; recursive map-self references, mixed or dynamically changing carriers and unsupported callback binding remain diagnosed. Mapping/view/set sources, remaining class-slot/descriptor/sequence/length-hint/async protocols, dynamic unpacking, tagged next defaults, general reflection/repr/reduce/subclassing and direct dos.array callback/result ownership remain deferred. Existing shared memory, string, frame and consumer limits apply; no timing or full map-conformance claim. |
max |
in part | builtins.numeric_reductions |
Compatible values/iterables/defaults and supported key callbacks, including stateful user callable objects. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator/length-hint protocols and dynamic callable types, mixed results, tuple ordering and argument errors |
memoryview |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
min |
in part | builtins.numeric_reductions |
Compatible values/iterables/defaults and supported key callbacks, including stateful user callable objects. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator/length-hint protocols and dynamic callable types, mixed results, tuple ordering and argument errors |
next |
in part | semantics.iterators |
Supported iterators with StopIteration and an optional compatible default. Ordinary user-class next supports direct exception identity, repeated probing and compatible defaults; direct next does not call iter. | Sequence fallback, callable/sentinel iteration, callable-valued class-slot descriptors, unsupported source adapters, tagged result/default shapes and full reflection remain pending; see the iterator semantic ledger. |
object |
in part | semantics.classes |
Root object construction and class checks; first-class root class aliases, callable construction and name/module metadata | Full default object protocols, attributes and representation |
oct |
in part | builtins.integer_formatting |
bin(), oct() and hex() over arbitrary signed integers and booleans, preserving standard prefixes, lowercase digits and signs; first-class builtin aliases, fixed call unpacking and round trips through int(text, base). Ordinary class index methods use inherited class-slot lookup, ignore instance-only special attributes, convert once and preserve raised exception identity. Supported non-integer returns and missing/noncallable slots produce catchable TypeError. This conversion is enabled only for bin(), oct(), hex() and chr(). | Bool-returning index methods require a DeprecationWarning adapter for the pinned CPython 3.9.6 behavior; ordinary scalar booleans remain supported. Callable-valued slots/descriptors, dynamic class changes, unsupported return representations and other custom-index consumers remain diagnosed or deferred. Invalid non-object scalar calls, full call-shape exception translation and broader builtin reflection remain pending. Output strings retain the shared DBC string and memory limits. |
open |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
ord |
in part | semantics.str |
One Unicode scalar or single-byte bytes value, arbitrary Python integer result, once-only argument evaluation, catchable exact wrong-length and supported wrong-type TypeErrors, captured aliases and fixed argument expansion | Bytearray and broader buffer adapters, surrogate representations, callable/exception type-name adapters and catchable argument-shape errors remain pending. Wrong-length Unicode inputs are counted through bounded shared bytecode chunks; string copying and the existing carrier limits still apply. |
pow |
in part | builtins.pow |
Integer/boolean two-argument powers with nonnegative exponents and optional None modulus; signed nonzero integer/boolean modular powers using square-and-multiply with reduction per product. Dynamic integer exponents, fixed argument expansion and keywords, saved builtin aliases, closures, callback composition and original Python exception identity execute. Zero modulus raises ValueError; zero base with negative exponent preserves pinned CPython conversion-overflow/ZeroDivisionError order. Unit modulus returns zero even for negative exponents. | Other negative exponents require floating-result or modular-inverse adapters and raise explicit builtin NotImplementedError. Float/complex results, custom numeric/power protocols, general dynamic call binding and repeated keyword merges remain diagnosed. Existing shared string, memory, frame and intermediate-product limits can refuse larger inputs; no full-carrier or deadline claim. Existing binary ** lowering retains its prior independent restrictions. |
print |
in part | builtins.print |
Supported representations, spacing/newlines and literal or computed string/None sep/end, with once-only evaluation and catchable wrong-type option errors | Float formatting and file/flush options |
property |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
range |
in part | semantics.ranges |
Arbitrary integer bounds, dynamic steps and Python 3.9 boolean attributes | Custom index protocols, argument errors and mixed attribute-type rebinding |
repr |
in part | semantics.str |
Supported scalars/collections, exceptions and user repr | Float and default address-bearing object/function/method representations |
reversed |
in part | semantics.iterators |
Lazy reversal of lists, homogeneous tuples, Unicode strings, bytes and arbitrary ranges; live list changes, latched exhaustion, source and element identity, returned/captured iterators, direct iterator methods and supported builtin type observations | Custom reversed/sequence protocols, mapping reversal, mixed tuples, range iterator type-name width selection, general reflection and catchable argument-shape errors remain pending. Repeatable untyped-empty-list inference remains conservative; linked-list lookup and shared string copies retain their existing costs. |
round |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
set |
in part | semantics.sets |
Supported homogeneous iterable conversion. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator/length-hint/hash protocols and arbitrary dynamic elements |
setattr |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
slice |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
sorted |
in part | builtins.sorting |
Stable sorted() over supported homogeneous iterable snapshots, scalar or tuple keys, key=None or supported callables including closures, bound methods and user callable objects, once-per-item keys in input order, reverse stability and checked signed-32-bit integer reverse conversion. Preserves original inputs and item identities, consumes sources before keys, propagates key exceptions, and exposes a saved sorted builtin alias. Linked bottom-up merge passes use native bounded counters and ordinary billed DBC instructions. Ordinary class iterator inputs use the shared consumer adapters. | Float/NaN, sets and custom partial orders, mixed dynamic keys/results, remaining custom iterable protocols and dynamically changing callable types, index reverse objects, full invalid-argument exception translation, dynamic call-site unpacking and builtin type reflection remain pending. Auxiliary key nodes consume existing shared-pool capacity; no larger memory grant is implied. |
staticmethod |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
str |
in part | semantics.str |
Empty constructor and supported scalar/container/exception/object formatting | Float formatting, decoding and generic object representations |
sum |
in part | builtins.numeric_reductions |
Supported addition with positional/keyword start. Ordinary class iterator inputs use the shared consumer adapters. | Remaining iterator protocols, dynamic result representations and custom arithmetic |
super |
in part | semantics.classes |
Zero-argument method-context dispatch, including saved parent methods | Explicit arguments, first-class super objects and general descriptor lookup |
tuple |
in part | semantics.collections |
Empty and identity-preserving tuple constructor; tuple literals are separate | General iterable construction and dynamically mixed lengths/shapes |
type |
in part | builtins.type_checks |
Type-name observations for exceptions, functions, bound methods, supported iterators, modules, user instances and first-class user/object class values. Builtin exception class values support class identity observations. | Standalone type() results, other first-class builtin types, general reflection and three-argument construction |
vars |
not yet | builtins.remaining |
This builtin is not implemented; related syntax or D/OS APIs do not count as its Python semantics. | |
zip |
in part | semantics.iterators |
Lazy supported-source iteration, shortest termination, shared cursors and repeated exhausted probes in Python 3.9. Ordinary class iterator sources preserve ordered acquisition and step consumption. | Sequence fallback, callable/sentinel iteration, callable-valued class-slot descriptors, unsupported source adapters, tagged result/default shapes and full reflection remain pending; see the iterator semantic ledger. |