Structure accessible by attribute name or index

2010-03-17 Thread Wes Santee
I am very new to Python, and trying to figure out how to create an object that has values that are accessible either by attribute name, or by index. For example, the way os.stat() returns a stat_result or pwd.getpwnam() returns a struct_passwd. In trying to figure it out, I've only come across C

Re: Structure accessible by attribute name or index

2010-03-17 Thread Wes Santee
On Mar 17, 11:14 am, Christian Heimes wrote: > Wes Santee wrote: > > I am very new to Python, and trying to figure out how to create an > > object that has values that are accessible either by attribute name, > > or by index.  For example, the way os.stat() ret

Re: Structure accessible by attribute name or index

2010-03-17 Thread Wes Santee
On Mar 17, 11:34 am, Bruno Desthuilliers wrote: > Wes Santee a écrit : > > > I am very new to Python, and trying to figure out how to create an > > object that has values that are accessible either by attribute name, > > or by index.  For example, the way os.stat()