%time magic funtion prevents variable assigment when used in function
Open
magics
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 4.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Description
I'm using IPython version 7.27. The following code snippet throws a `NameError: name 'variable' is not defined`:
```
def test(msg):
%time variable = msg
print(variable)
test("moin")
```
The bug is similar to #11659 and #11813, but it seems to only occur when used inside a function body.
Contributor guide
Assessment
This issue has not been assessed yet.