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/042962.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 elementsSkip Montanaro skip at pobox.com
Mon Mar 8 15:46:37 EST 2004
    >> 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).

    aahz> I'm not sure to what extent we can/should enforce this, but I'm -1
    aahz> on any proposal for which this isn't the documented behavior.

I guess this is an area where PEP 318 should be fleshed out a bit.  I don't
see any reason it shouldn't be expanded to include semantics as well as
syntax.  That might require a title change, but I don't think the semantics
should be left unspecified, nor do I think the syntax and semantics should
reside in separate PEPs.

Skip

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