#32156: Add __class_getitem__ to support runtime type parameters for more 
classes
-------------------------------------+-------------------------------------
     Reporter:  Brady Kieffer        |                    Owner:  Brady
                                     |  Kieffer
         Type:  New feature          |                   Status:  assigned
    Component:  Utilities            |                  Version:  2.2
     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:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 Hi Brady. Thanks for the input.

 I'm a bit sceptical about this. #31223 was fixed on the basis that:

 1. ''It'll change our life''
 2. It's all we need.

 No 2 now (already) seems false.

 More though, this is more than a bit boilerplatey...


 {{{
     @classmethod
     def __class_getitem__(cls, *args, **kwargs):
         return cls
 }}}

 Question: why isn't this mypy's issue? i.e. why can't we demand better
 type inference in this case?
 (Type annotations cool. Unnecessary boilerplate, not so much…)
 What do the mypy people say about that type of case?

 Thanks for helping me to understand!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32156#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/070.65bbb2c1e464ba64ce08f13971399700%40djangoproject.com.

Reply via email to