OK, it's certainly easier *not* to change it, so I'm happy with this argument for the current name.
Łukasz, do you agree? Then I think we can submit this to the SC for acceptance. On Tue, Feb 25, 2020 at 6:27 AM Nick Coghlan <ncogh...@gmail.com> wrote: > On Tue, 25 Feb 2020 at 15:19, Ethan Smith <et...@ethanhs.me> wrote: > > > > The discussion on the name change came from Łukasz > https://github.com/python/cpython/pull/18239#discussion_r380996908 > > > > I suggested "GenericType" to be in line with other things in types.py. > > Quoting Łukasz question: "I know it's late for this bikeshedding but I > was always a bit puzzled by the name "GenericAlias". What is it > aliasing?" > > The "GenericAlias" name seemed appropriate to me as these aren't real > types - they're aliases for the corresponding container type with some > extra metadata attached. So "list[str]" is *mostly* just a different > way of writing "list" at runtime - it's primarily typecheckers that > will treat it differently (while the runtime typechecking machinery > will reject it as too specific to be checked non-destructively). > > "GenericAliasForAConcreteContainerType" would be excessively wordy > though, hence "GenericAlias". > > By contrast, I'd expect something called "GenericType" to actually be > able to do full runtime typechecking and enforcement (e.g. having > instances throw TypeError if you tried to insert a value of the wrong > type). > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/ELZLDTZVBUM5DFJV3D46I2QKXGFNYRGC/ Code of Conduct: http://python.org/psf/codeofconduct/