Skip to content

Commit 6a0a7c0

Browse files
docs(builtins): Allign docs and clean redaction.
1 parent 11aae5a commit 6a0a7c0

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

docs/pages/reference/builtins.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Edge Python is functional-first. Introspection helpers (`eval`, `exec`, `compile
2525

2626
### print
2727

28-
`print(*args)`: space-separated values to stdout, trailing newline. No `sep` / `end` / `file` / `flush` kwargs, pre-join for custom separators.
28+
`print(*args)`: space-separated values to stdout, trailing newline. No `sep` / `end` / `file` / `flush` kwargs; pre-join for custom separators.
2929

3030
```python
3131
print(1, 2, 3)
@@ -241,7 +241,7 @@ frozenset({2, 3, 1})
241241
{'a': 1, 'b': 2}
242242
```
243243

244-
`dict` also accepts a mapping or kwargs; iterable-of-pairs (`dict([('a', 1)])`) is not supported, use a literal or `dict.update`.
244+
`dict` also accepts a mapping or kwargs; iterable-of-pairs (`dict([('a', 1)])`) is not supported; use a literal or `dict.update`.
245245

246246
### chr, ord
247247

@@ -444,9 +444,9 @@ handle("prod", req)
444444
handle("dev", req)
445445
```
446446

447-
Candidates must be imported statically somewhere, `import_module` is a runtime *lookup*, not a *fetch*. Preserves lockfile and integrity: every reachable module is verified at compile time. Unknown name -> `NameError`; non-module global -> `TypeError`.
447+
Candidates must be imported statically somewhere; `import_module` is a runtime *lookup*, not a *fetch*. Preserves lockfile and integrity: every reachable module is verified at compile time. Unknown name -> `NameError`; non-module global -> `TypeError`.
448448

449-
Dynamic loading (`importlib.import_module`, `__import__`) doesn't exist by design, static-import + runtime-dispatch replaces it.
449+
Dynamic loading (`importlib.import_module`, `__import__`) doesn't exist by design; static-import + runtime-dispatch replaces it.
450450

451451
### bytes
452452

@@ -475,7 +475,7 @@ See [Bytes](/language/data-types#bytes) for literal syntax (`b"..."`), indexing,
475475

476476
### bytes_fromhex, int_from_bytes, int_to_bytes
477477

478-
Free functions, not int/bytes methods, primitives have no bound methods (`(5).bit_length()`, `(255).to_bytes(...)` don't exist).
478+
Free functions, not int/bytes methods primitives have no bound methods (`(5).bit_length()`, `(255).to_bytes(...)` don't exist).
479479

480480
- `bytes_fromhex(s)`: hex string -> bytes. Inner whitespace ignored; non-hex -> `ValueError`.
481481
- `int_from_bytes(b, order)`: `order` is `"big"` or `"little"`. Unsigned (high bit never sign).
@@ -697,7 +697,7 @@ print(format("hi", ">10"))
697697

698698
## Attribute access
699699

700-
`getattr` / `hasattr` consult the built-in method table for primitives (str/list/dict/set/bytes) and the instance `__dict__` for user-class instances. They don't walk user-class method definitions, `hasattr(MyClass(), 'my_method')` is `False`. Functional pattern: call functions with values, don't look up methods reflectively.
700+
`getattr` / `hasattr` consult the built-in method table for primitives (str/list/dict/set/bytes) and the instance `__dict__` for user-class instances. They don't walk user-class method definitions `hasattr(MyClass(), 'my_method')` is `False`. Functional pattern: call functions with values, don't look up methods reflectively.
701701

702702
### getattr
703703

@@ -757,7 +757,7 @@ print(f())
757757
{'a': 1, 'b': 2}
758758
```
759759

760-
Dicts are copies, mutation doesn't change VM bindings.
760+
Dicts are copies; mutation doesn't change VM bindings.
761761

762762
### setattr, delattr
763763

@@ -866,7 +866,7 @@ Concurrency primitives; full model in [Async](/language/async).
866866

867867
### run
868868

869-
`run(*coros)`: schedules every arg, drains until each reaches a terminal state, returns the first arg's result. Errors from peers other than the first are discarded, for fan-out collecting every result, use `gather`.
869+
`run(*coros)`: schedules every arg, drains until each reaches a terminal state, returns the first arg's result. Errors from peers other than the first are discarded; for fan-out collecting every result, use `gather`.
870870

871871
### sleep
872872

@@ -923,5 +923,4 @@ timed out
923923

924924
### cancel
925925

926-
`cancel(coro)`: flag a registered coroutine for cancellation; next tick stops it. Cooperative and silent, body doesn't observe `CancelledError`. For deadline-driven exception-style cancellation, use `with_timeout`.
927-
926+
`cancel(coro)`: flag a registered coroutine for cancellation; next tick stops it. Cooperative and silent — the body doesn't observe `CancelledError`. For deadline-driven exception-style cancellation, use `with_timeout`.

0 commit comments

Comments
 (0)