Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Why is from code import * different from entering that code directly into the REPL?
Post: RE: Why is from code import * different from enter...

Thank you all
sebi General Coding Help 5 3,363 Apr-03-2019, 11:40 AM
    Thread: Why is from code import * different from entering that code directly into the REPL?
Post: RE: Why is from code import * different from enter...

Indeed. ...but I do call the function from within the REPL (not the module) as I enter: from code import * func() print(a)I would expect to get 1 (rather than 0) as when entering the content from code...
sebi General Coding Help 5 3,363 Apr-03-2019, 07:18 AM
    Thread: Why is from code import * different from entering that code directly into the REPL?
Post: Why is from code import * different from entering ...

...indeed, for code.py being a = 0 def func(): global a a = 1after entering that code directly into the REPL and typing func() print(a)I get 1, while I get 0 after a from code import *Why? Dea...
sebi General Coding Help 5 3,363 Apr-03-2019, 07:01 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020