[Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484

Guido van Rossum guido at python.org
Fri Aug 5 18:31:03 EDT 2016


On Fri, Aug 5, 2016 at 3:26 PM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> On Fri, Aug 5, 2016 at 10:41 AM, Guido van Rossum <guido at python.org> wrote:
>> On Fri, Aug 5, 2016 at 9:23 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
>>> Relatedly, it would be nice to address the future use of this syntax
>>> for more generic variable annotations (a la function annotations), but
>>> that's less of a concern for me.  The only catch is that making
>>> "class" an optional part of the syntax impacts the semantics of the
>>> more generic "variable annotations".  However, I don't see "class" as
>>> a problem, particularly if it is more strongly associated with the
>>> name rather than the annotation, as you've suggested below.  If
>>> anything it's an argument *for* your recommendation. :)
>>
>> I'm unclear on what you mean by "more generic variable annotations".
>> Do you have an example?
>
> I'm talking about the idea of using variable annotations for more than
> just type declarations, just as there are multiple uses in the wild
> for function annotations.  As I said, I'm not terribly interested in
> the use case and just wanted to point it out. :)

Heh, I actively want to squash such uses. My confusion was due to the
specific meaning of "generic" in PEP 484.

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-ideas mailing list