A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-October/018104.html below:

[Python-Dev] Dictionary subclasses and exec

[Python-Dev] Dictionary subclasses and exec [Python-Dev] Dictionary subclasses and execGuido van Rossum guido@python.org
Tue, 23 Oct 2001 19:58:27 -0400
> >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!   <puts on thinking cap>

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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4