[Tutor] Tutor Digest, Vol 25, Issue 70
Carroll, Barry
Barry.Carroll at psc.com
Tue Mar 28 19:10:32 CEST 2006
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
barry.carroll at psc.com
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" <john at fouhy.net>
> Subject: Re: [Tutor] Data Type with Dictionary and List Behavior
> To: tutor at python.org
> Message-ID:
> <5e58f2e40603271633w520296bdndba139c38c3f322d at mail.gmail.com>
> 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.
>
>
More information about the Tutor
mailing list