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/2012-March/117205.html below:

[Python-Dev] Add a frozendict builtin type

[Python-Dev] Add a frozendict builtin type [Python-Dev] Add a frozendict builtin typeNick Coghlan ncoghlan at gmail.com
Fri Mar 2 03:06:21 CET 2012
On Fri, Mar 2, 2012 at 11:50 AM, R. David Murray <rdmurray at bitdance.com> wrote:
> +1.  Except in very limited circumstances (such as a security sandbox)
> I would *much* rather have the code I'm interacting with use advisory
> means rather than preventing me from being a consenting adult.  (Having to
> name mangle by hand when someone has used a __ method is painful enough,
> thank you...good thing the need to do that doesn't dome up often (mostly
> only in unit tests)).

The main argument I'm aware of in favour of this kind of enforcement
is that it means you get exceptions at the point of *error* (trying to
modify the "read-only" dict), rather than having a strange
action-at-a-distance data mutation bug to track down.

However, in that case, it's just fine (and in fact better) if there is
a way around the default enforcement via a more verbose spelling.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

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