Re: A basic dictionary question

2015-06-11 Thread MRAB
On 2015-06-11 11:10, David Aldrich wrote: Hi I am fairly new to Python. I am writing some code that uses a dictionary to store definitions of hardware registers. Here is a small part of it: import sys register = { 'address' : 0x3001c, 'fields' : { 'FieldA' : {

Re: A basic dictionary question

2015-06-11 Thread Peter Otten
David Aldrich wrote: > Hi > > I am fairly new to Python. I am writing some code that uses a dictionary > to store definitions of hardware registers. Here is a small part of it: > > import sys > > register = { > 'address' : 0x3001c, > 'fields' : { > 'FieldA' : { >

A basic dictionary question

2015-06-11 Thread David Aldrich
Hi I am fairly new to Python. I am writing some code that uses a dictionary to store definitions of hardware registers. Here is a small part of it: import sys register = { 'address' : 0x3001c, 'fields' : { 'FieldA' : { 'range' : (31,20), }, 'FieldB