John: Well, I haven't made a custom container class before. This looks like a good time to start. And the sample code you provided looks like a good starting place. Thanks for your help.
Regards, Barry [EMAIL PROTECTED] 541-302-1107 ________________________ We who cut mere stones must always be envisioning cathedrals. -Quarry worker's creed > ------------------------------ > > Message: 2 > Date: Tue, 28 Mar 2006 12:33:46 +1200 > From: "John Fouhy" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Data Type with Dictionary and List Behavior > To: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > <<snip>> > > Probably your best bet is to define your own container class. If you > define __getitem__, you can use [] with instances of your class, just > like lists or dicts. > <<snip>> > > HTH! > > -- > John. > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor