#31223: Add __class_getitem__ to support runtime type parameters for some
classes
-------------------------------------+-------------------------------------
Reporter: Sobolev Nikita | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: types, mypy, | Triage Stage:
django-stubs | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sobolev Nikita):
Replying to [comment:1 Ran Benita]:
Yes, this is a best-practice indeed. But.
Inheriting from `Generic` will also modify `__init_subclass__` and
`__new__` methods. And I am not sure about it.
I guess for now just `__class_getitem__` is enough. It has zero possible
problems and works for us.
Later (when working on next typing-related things) we would need to return
to this question once again.
--
Ticket URL: <https://code.djangoproject.com/ticket/31223#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.6e7bbb151b7dc2d0664bf96674f8a06d%40djangoproject.com.