Skip to content

There may be a bug occured when I use 'global' keyword. #10

@coderelease

Description

@coderelease

If loaded the ipython-autoimport module, It will be found that the x variable can not be changed by function which global keyword is inside.

x = "AAAAA"
def myfunc():
  global x
  x = "BBBBB"

myfunc()

print(x)

the correct output is "BBBBB", but "AAAAA" output when use ipython autoimport.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions