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/2004-March/042966.html below:

[Python-Dev] PEP 318 - generality of list; restrictions on elements

[Python-Dev] PEP 318 - generality of list; restrictions on elements [Python-Dev] PEP 318 - generality of list; restrictions on elementsAahz aahz at pythoncraft.com
Mon Mar 8 16:00:01 EST 2004
On Mon, Mar 08, 2004, Skip Montanaro wrote:
>
> 
>     >> I'd expect w2() to be passed whatever w1() returns, regardless of
>     >> whether it's callable.  It should raise an exception if it gets
>     >> something it can't handle.
> 
>     aahz> No, that's not right.  If
> 
>     aahz>     def foo() [w1, w2]: pass
> 
>     aahz> is valid, this must also always be valid:
> 
>     aahz>     def foo() [w2]: pass
> 
> Can you explain why this must be the case?  I agree that coupling between w1
> and w2 should be discouraged (see my ast example).

Principle of least surprise, essentially.  There are already going to be
enough obscure uses for this; let's try to keep the completely whacky out
of it.  You'll have to come up with an awfully convincing use case to
change my mind.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Do not taunt happy fun for loops. Do not change lists you are looping over."
--Remco Gerlich, comp.lang.python

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