mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
170744df82
commit
20b7198341
@ -56,18 +56,18 @@ Only basic types can be passed between python and lua.
|
|||||||
The following table shows the type mapping.
|
The following table shows the type mapping.
|
||||||
If you pass an unsupported type, an exception will be raised.
|
If you pass an unsupported type, an exception will be raised.
|
||||||
|
|
||||||
| Python type | Lua type | Allow create in Python? |
|
| Python type | Lua type | Allow create in Python? | Reference? |
|
||||||
| ----------- | -------- | ---------------------- |
|
| ----------- | -------- | ---------------------- | --------- |
|
||||||
| `None` | `nil` | YES |
|
| `None` | `nil` | YES | NO |
|
||||||
| `bool` | `boolean` | YES |
|
| `bool` | `boolean` | YES | NO |
|
||||||
| `int` | `number` | YES |
|
| `int` | `number` | YES | NO |
|
||||||
| `float` | `number` | YES |
|
| `float` | `number` | YES | NO |
|
||||||
| `str` | `string` | YES |
|
| `str` | `string` | YES | NO |
|
||||||
| `tuple` | `table` | YES |
|
| `tuple` | `table` | YES | NO |
|
||||||
| `list` | `table` | YES |
|
| `list` | `table` | YES | NO |
|
||||||
| `dict` | `table` | YES |
|
| `dict` | `table` | YES | NO |
|
||||||
| `lua.Table` | `table` | YES |
|
| `lua.Table` | `table` | YES | YES |
|
||||||
| `lua.Function`| `function`| NO |
|
| `lua.Function`| `function`| NO | YES |
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```cpp
|
```cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user