[Python-Dev] PEP 318 - generality of list;
restrictions on elements
Fred L. Drake, Jr.
fdrake at acm.org
Mon Mar 8 15:45:30 EST 2004
On Monday 08 March 2004 03:05 pm, Skip Montanaro wrote:
> Must take a single argument, which itself must be a callable,
> right?
I 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.
On Monday 08 March 2004 03:27 pm, Skip Montanaro wrote:
> 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
And I certainly expect that's the typical case; I was mostly reacting to your
use of the word "must" rather than the idea. When I read "must", that tells
me someone is going to check that in the mechanism rather than just passing
it on.
> 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.
Defining foo to some useful object doesn't imply that it's callable, or that
it can't be further transformed in useful ways.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation
More information about the Python-Dev
mailing list