[Python-ideas] Improving the expressivity of function annotations

Carl M. Johnson cmjohnson.mailinglist at gmail.com
Mon Apr 4 11:02:17 CEST 2011


On Sun, Apr 3, 2011 at 10:49 PM, Masklinn <masklinn at masklinn.net> wrote:

> The "issue" is roughly the same as for abcs, in that you still have to give a name (and pre-define a type) for something which may not warrant it, and this naming may even serve to muddy the water some cases when used in type signatures (see Mapping abc example)
>
> Otherwise, sure.

I guess I'm not getting it then. What's the alternative? We can either
a) make up an ABC ourselves b) have a prefilled library of ABCs and
pick one off the shelf or c) not use ABCs at all. In the case that
something doesn't "warrant" an ABC, then just pick c. In fact, some
people believe that we should always pick c to be more Pythonic and
duck type-ish.

Or am I missing an option? I suppose there could be a factory of some
sort to make new ABCs based on existing ABCs already in some sort of
library… Is that what you're proposing?



More information about the Python-ideas mailing list