Thanks for the feedback.

Ticket: https://code.djangoproject.com/ticket/25611
Pull request: https://github.com/django/django/pull/5482

On Monday, October 26, 2015 at 8:22:21 AM UTC-4, Marc Tamlyn wrote:
>
> Sounds good to me. There's not any (good) reason why anyone would be 
> calling these with kwargs that I can think of so we're safe from a compat 
> perspective.
>
> Marc
>
> On 26 October 2015 at 03:25, Loïc Bistuer <[email protected] 
> <javascript:>> wrote:
>
>> +1
>>
>> > On Oct 25, 2015, at 23:09, charettes <[email protected] <javascript:>> 
>> wrote:
>> >
>> > Now that Curtis did all the investigation work I think it wouldn't hurt 
>> being consistent here.
>> >
>> > __get__(self, instance, cls=None) and __set__(self, instance, value) 
>> look like sane defaults to me.
>> >
>> > Le samedi 24 octobre 2015 18:36:32 UTC-4, Tim Graham a écrit :
>> > Curtis, or should I say FunkyBob, raised the issue here: 
>> https://github.com/django/django/pull/5226
>> >
>> > Currently we have several different signatures:
>> >
>> > def __get__(self, instance, instance_type=None)
>> > def __get__(self, obj, type=None):
>> > def __get__(self, instance, type=None)
>> > def __get__(self, obj, objtype)
>> > def __get__(self, instance, owner)
>> >
>> > and the Python docs don't seem to have a single preference.
>> >
>> > Curtis proposed:
>> > """
>> > * "instance_type" is explicit
>> > * "cls" is a common convention for passing a class
>> > * "owner" is in the docs {but so are others}
>> > * and "type" I think is a bit confusing...
>> >
>> > So... my preference, upon reflection, would be: def __get__(self, 
>> instance, cls=None):
>> > """
>> >
>> > For set, it's mostly: def __set__(self, instance, value)
>> > but a couple times: def __set__(self, obj, value)
>> >
>> > Do you think it's worth trying to be consistent or not?
>> >
>> > --
>> > You received this message because you are subscribed to the Google 
>> Groups "Django developers (Contributions to Django itself)" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to [email protected] <javascript:>.
>> > To post to this group, send email to [email protected] 
>> <javascript:>.
>> > Visit this group at http://groups.google.com/group/django-developers.
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/39cb93c3-a6e5-4deb-b34f-95bd844a764e%40googlegroups.com
>> .
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers  (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/B22998EC-5FCB-4212-AA2D-A50698F75B6C%40gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3303bd75-87fd-4792-876a-3990a9823716%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to