#34808: Some aggregation functions may return None; this isn't well documented
--------------------------------------+------------------------------------
     Reporter:  Eric Baumgartner      |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  4.2
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Eric Baumgartner):

 Replying to [comment:5 David Sanders]:
 > Hi Lufafa,
 >
 > It'd be best to check that Eric hasn't already started… (please read the
 comments above).

 I haven't started on this, Lufafa you're welcome to dig in if you want.
 Otherwise I'll try to take a pass on this over the weekend.

 Based on David's feedback I'm backing off the idea of adding default
 params to every use of .aggregate() site-wide and just focusing on the
 examples on the aggregation topic page.

 On the querysets page, I would mention that Aggregate.defaults uses
 Coalesce. And I'm also thinking that the "Return type" documentation for
 each individual function (Sum, Avg, etc) needs to mention the case where
 it may return None. While there is a note about empty querysets directly
 under the Aggregation functions header, I think the way documentation is
 used is that a lot of people scan the list of functions in the sidebar and
 click the one they're interested in. This scrolls them directly to the
 function documentation (e.g. for Sum) and they'll never see the empty
 queryset note.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34808#comment:6>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018a6bf5afd8-faa9f6f2-796c-4eb4-9073-5190747b861d-000000%40eu-central-1.amazonses.com.

Reply via email to