Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8093

MicroPython • Re: Variable Scope problem (again)

$
0
0
Not sure if it works in MP, but worth to try:
Syntax
eval(expression, globals, locals)
Parameter ValuesDescription
expression A String, that will be evaluated as Python code
globals Optional. A dictionary containing global parameters
locals Optional. A dictionary containing local parameters
P.S. Some examples https://realpython.com/python-eval-func ... ent-locals

Statistics: Posted by gmx — Thu Dec 18, 2025 10:26 pm



Viewing all articles
Browse latest Browse all 8093

Trending Articles