A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/007984.html below:

A small proposed change to dictionaries' "get" method

[Python-Dev] Re: A small proposed change to dictionaries' "get" methodGreg Ewing greg@cosc.canterbury.ac.nz
Mon, 07 Aug 2000 13:50:32 +1200 (NZST)
> dict.default('hello', []).append('hello')

Is this new method going to apply to dictionaries only,
or is it to be considered part of the standard mapping
interface?

If the latter, I wonder whether it would be better to
provide a builtin function instead. The more methods
are added to the mapping interface, the more complicated
it becomes to implement an object which fully complies
with the mapping interface. Operations which can be
carried out through the basic interface are perhaps
best kept "outside" the object, in a function or
wrapper object.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+



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