problems with shelve(), collections.defaultdict, self

7stud 7stud at excite.com
Sat Feb 11 14:22:14 EST 2012


On Feb 11, 10:56 am, Ian Kelly <ian.g.ke... at gmail.com> wrote:
> On Sat, Feb 11, 2012 at 10:54 AM, Ian Kelly <ian.g.ke... at gmail.com> wrote:
> > class Dog(dict):
>
> >    def __missing__(self):
> >        return 0
>
> Sorry, that should have been:
>
> class Dog(dict):
>
>     def __missing__(self, key):
>         return 0
>
> Cheers,
> Ian

Thanks Ian!



More information about the Python-list mailing list