Skip to content

Commit fda45ee

Browse files
committed
Add detail about config 'type' attribute to indicate the currently running interpreter.
1 parent 44cdd4a commit fda45ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,16 @@ from pyscript import config
5656

5757
# It's just a dict.
5858
print(config.get("files"))
59+
# This will be either "mpy" or "py" depending on the current interpreter.
60+
print(config["type"])
5961
```
6062

63+
!!! info
64+
65+
The `config` object will always include a `type` attribute set to either
66+
`mpy` or `py`, to indicate which version of Python your code is currently
67+
running in.
68+
6169
!!! warning
6270

6371
Changing the `config` dictionary at runtime has no effect on the actual

0 commit comments

Comments
 (0)