This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
github
/
micropython
mirror of
https://github.com/micropython/micropython.git
Watch
1
Star
0
Fork
0
Code
Issues
Projects
Releases
Wiki
Activity
embedded
microcontroller
python
micropython
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11526
Commits
3
Branches
62
Tags
504 MiB
Tree:
c5af3217d9
master
parse-bytecode
v1.22-release
v1.0
v1.0-rc1
v1.0.1
v1.1
v1.1.1
v1.10
v1.11
v1.12
v1.13
v1.14
v1.15
v1.16
v1.17
v1.18
v1.19
v1.19.1
v1.2
v1.20.0
v1.21.0
v1.22.0
v1.22.0-preview
v1.22.1
v1.22.2
v1.23.0
v1.23.0-preview
v1.24.0-preview
v1.3
v1.3.1
v1.3.10
v1.3.2
v1.3.3
v1.3.4
v1.3.5
v1.3.6
v1.3.7
v1.3.8
v1.3.9
v1.4
v1.4.1
v1.4.2
v1.4.3
v1.4.4
v1.4.5
v1.4.6
v1.5
v1.5.1
v1.5.2
v1.6
v1.7
v1.8
v1.8.1
v1.8.2
v1.8.3
v1.8.4
v1.8.5
v1.8.6
v1.8.7
v1.9
v1.9.1
v1.9.2
v1.9.3
v1.9.4
Branches
Tags
${ item.name }
Create tag
${ searchTerm }
Create branch
${ searchTerm }
from 'c5af3217d9'
${ noResults }
micropython
/
tests
/
import
/
gen_context.py
12 lines
109 B
Raw
Normal View
History
objgenerator: Generator must execute in its defining lexical context. I.e. with its own globals. So, just as for functions, we need to switch globals when resuming a generator.
11 years ago
import
gen_context2
GLOBAL
=
"
GLOBAL
"
tests: Format all Python code with black, except tests in basics subdir. This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
5 years ago
objgenerator: Generator must execute in its defining lexical context. I.e. with its own globals. So, just as for functions, we need to switch globals when resuming a generator.
11 years ago
def
gen
(
)
:
print
(
GLOBAL
)
yield
1
tests: Format all Python code with black, except tests in basics subdir. This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
5 years ago
objgenerator: Generator must execute in its defining lexical context. I.e. with its own globals. So, just as for functions, we need to switch globals when resuming a generator.
11 years ago
gen_context2
.
call
(
gen
(
)
)