[Python-ideas] PEP 484 evolution
Terry Reedy
tjreedy at udel.edu
Fri Mar 18 17:53:11 EDT 2016
On 3/18/2016 3:09 PM, Guido van Rossum wrote:
> It's a mix. The list of things I definitely want to get to is now
> here: https://github.com/python/typing/milestones/3.5.2
#2: backport aab2c59 to python2/typing.py
I believe you are referring to a back-compatibility module on PyPI. If
so, this is out-of-scope for python-ideas. The only connection with
3.5.2 is that 2.7.12 should come out about the same time.
#3, #1: many parameters require long comment signature?
These are a question and possible solution for the type comments
intended for 2.7 (though allowed, I believe, in 3.5 and earlier with the
back-compatibility module). The issue: some functions have so many
parameters that a type comment will not fit on one line. A proposal
discussed here before is multiline type comments. The alternate
solution is to allow '...' as an abbreviation.
My very slight objection is that this will mean that the type comment no
longer matches the function signature above. The counter-argument is
that duplicating a long parameter type list, especially when one only
cares about typing the return type, is obnoxious. I presume this
proposal is based on problems with real code. + something.
I do not understand, in #3, "Would it be valid to annotate just a few
argument [and use ... also, I presume]? and "Yes". What would it look
like? Is that part of #1?
#4 Ambiguity of "Z = Dict[T, int]".
I don't understand enough to understand the 2nd interpretation, so
'pass'. Ambiguity is bad, though.
#5 A proposal to allow 'Type[T]'? Where "T = TypeVar['T']"?
Just unpostponed from last May.
#6 "What does it mean to inherit from a generic type without specifying
type parameters?"
I am not clear on what patch is being proposed. This seems to still be
in ideas stage.
#7 Allow @overload in implementation as well as stub files.
You originally rejected this, then reopened in January with discussion
here and pydev. Is more discussion needed? Final votes on pydev?
--
Terry Jan Reedy
More information about the Python-ideas
mailing list