None - Maple Help

Python

 None
 variable equivalent of Python's None

 Calling Sequence None

Description

 • The Python:-None variable matches Python's "None" result.  This variable may show up in results from executing Python commands, and can be used as an argument when calling Python commands.
 • This name is part of the Python package, so it can be used in the short form None only after executing the command with(Python). However, it can always be accessed through the long form of the command by using Python:-None.

Examples

 > $\mathrm{with}\left(\mathrm{Python}\right):$
 > $\mathrm{dict}≔\mathrm{EvalString}\left("\left\{ \text{'}color\text{'}:\text{'}blue\text{'}, \text{'}shape\text{'}:\text{'}square\text{'}, \text{'}material\text{'}:\text{'}steel\text{'} \right\}"\right)$
 ${\mathrm{dict}}{≔}{""}$ (1)
 > $\mathrm{SetVariable}\left("D",\mathrm{dict}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{EvalString}\left("D.get\left(\text{'}color\text{'}\right)"\right)$
 ${"blue"}$ (3)
 > $\mathrm{EvalString}\left("D.get\left(\text{'}noprop\text{'}\right)"\right)$
 ${\mathrm{None}}$ (4)
 > $\mathrm{EvalFunction}\left('\mathrm{type}',\mathrm{Python}:-\mathrm{None}\right)$
 ${">"}$ (5)

Compatibility

 • The Python[None] command was introduced in Maple 2018.