list[type, type, ...] ?!

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Dec 3 18:51:39 EST 2020


On 4/12/20 12:31 pm, Paul Bryan wrote:
> Would it make sense for list's __class_getitem__ 
> (GenericAlias?) to perform similar checking as 
> typing._SpecialGenericAlias (nparams)?

Maybe. It's a slippery slope -- how much of the typing module do we
want to drag into the core of the interpreter?

-- 
Greg


More information about the Python-list mailing list