Re: [Tutor] would someone please explain this concept to me

2019-06-04 Thread Steven D'Aprano
In case you are still confused, we can simplify the whole process by eliminating the unnecessary use of an external module. blank = {} feeds = {} feeds['a'] = blank feeds['a'][1] = "Hello" print(blank) # will print {1: 'Hello'} We can see that the dict named "blank" and the dict named

Re: [Tutor] would someone please explain this concept to me

2019-06-04 Thread Steven D'Aprano
On Tue, Jun 04, 2019 at 11:37:23PM +, nathan tech wrote: > globals.py: > > feeds={} > blank_feed={} > blank_feed["checked"]=1 > blank_feed["feed"]=0 That is more easily, and better, written as: feeds = {} blank_feed = {"checked": 1, "feed": 0} > main file: > > import globals as g > #

Re: [Tutor] would someone please explain this concept to me

2019-06-04 Thread Alan Gauld via Tutor
On 05/06/2019 00:37, nathan tech wrote: > Hi there, > > So I have just fixed a huge bug in my program, but don't understand > exactly... How it bugged. Neither do I, your explanation raises more questions than answers. > globals.py: > feeds={} > blank_feed={} > blank_feed["checked"]=1 >

[Tutor] would someone please explain this concept to me

2019-06-04 Thread nathan tech
Hi there, So I have just fixed a huge bug in my program, but don't understand exactly... How it bugged. Confused? I sure was. Here's some code: globals.py: feeds={} blank_feed={} blank_feed["checked"]=1 blank_feed["feed"]=0 main file: import globals as g # some code that loads a feed