[Python-Dev] Dictionary subclasses and exec (original) (raw)
Guido van Rossum guido@python.org
Tue, 23 Oct 2001 19:58:27 -0400
- Previous message: [Python-Dev] Dictionary subclasses and exec
- Next message: [Python-Dev] Dictionary subclasses and exec
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>Alas, this is one of the things that don't work yet. To set and get
Oh, well; I need to come up with a different example for subclassing a built-in type, then. Thanks!
You can use a similar example but not override getitem / setitem; instead, add some new methods (e.g. merge() -- like update() but the existing key wins).
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Dictionary subclasses and exec
- Next message: [Python-Dev] Dictionary subclasses and exec
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]