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/2006-February/060822.html below:

[Python-Dev] PEP 351

[Python-Dev] PEP 351 [Python-Dev] PEP 351Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 13 07:35:07 CET 2006
Bengt Richter wrote:

> Anyhow, why shouldn't you be able to call freeze(an_ordinary_list) and get back freeze(xlist(an_ordinary_list))
> automatically, based e.g. on a freeze_registry_dict[type(an_ordinary_list)] => xlist lookup, if plain hash fails?

[Cue: sound of loud alarm bells going off in Greg's head]

-1 on having any kind of global freezing registry.

If we need freezing at all, I think it would be quite
sufficient to have a few types around such as
frozenlist(), frozendict(), etc.

I would consider it almost axiomatic that code needing
to freeze something will know what type of thing it is
freezing. If it doesn't, it has no business attempting
to do so.

If you need to freeze something not covered by the
standard frozen types, write your own class or function
to handle it, and invoke it explicitly where appropriate.

Greg
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