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/042958.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:27:54 EST 2004
    Fred> On Monday 08 March 2004 03:05 pm, Skip Montanaro wrote:

    >> Must take a single argument, which itself must be a callable, right?

    Fred> If I write:

    Fred>     def foo() [w1, w2]:
    Fred>         pass

    Fred> I'd expect w2() to be passed whatever w1() returns, regardless of
    Fred> whether it's callable.  It should raise an exception if it gets
    Fred> something it can't handle.

Yes.  I was thinking of the case where we wanted it to return something
useful which could be bound to the name "foo".  I suppose if you've had too
much caffeine you could dream up a case where w1() returns an AST based on
the original foo and w2() does something with it to cook up a new object,
but I suspect that would be pretty rare.

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