[prev in list] [next in list] [prev in thread] [next in thread]
List: python-ideas
Subject: Re: [Python-ideas] Improving the expressivity of function
From: Nick Coghlan <ncoghlan () gmail ! com>
Date: 2011-04-05 10:34:04
Message-ID: BANLkTimJEpgJ79CURBZMxP-D0JsBrq8Uxw () mail ! gmail ! com
[Download RAW message or body]
On Tue, Apr 5, 2011 at 4:35 PM, Masklinn <masklinn@masklinn.net> wrote:
> I would still think that, for the usage of function annotation to take off (and be \
> used by multiple tools), there needs to be some kind of commonality between all \
> tools. At least for the features closest to core.
You're free to think that. We disagree, as is explicitly documented in
PEP 3107: "Function annotations are nothing more than a way of
associating arbitrary Python expressions with various parts of a
function at compile-time."
Function annotations, on their own, mean absolutely nothing. They only
acquire meaning when associated with a specific consumer of those
annotations. If a decorator takes a lot of arguments about how to
handle particular parameters (or a function's return value), then it
is a prime candidate for refactoring to be annotation based instead.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic