#36889: cursor_iter() docstring could use more detail about parameters and 
behavior
-------------------------------------+-------------------------------------
     Reporter:  Muhammed irshad      |                    Owner:  (none)
  ismail                             |
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  6.0
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Muhammed irshad ismail):

 Thank you for the thoughtful feedback and for explaining the concern
 around keeping Django’s git history focused and intentional.

 The reason I ended up reading cursor_iter() was while following the
 execution path for queryset evaluation and SQL compilation, specifically
 when tracing how rows are fetched in batches during query execution. While
 stepping through the code, I encountered cursor_iter() and had to read its
 implementation to understand the role of sentinel, the purpose of
 col_count, and the guarantee around closing the cursor.

 I understand that cursor_iter() is a private, internal helper and not part
 of the public API. My motivation was mainly from a contributor’s
 perspective: when navigating the SQL compiler internals for debugging or
 learning purposes, having a slightly more descriptive docstring can reduce
 the need to reverse- engineer intent from the implementation.

 That said, I completely understand the concern about adding commit history
 for internal helpers, and I’m happy to defer to maintainers’ judgment on
 whether this level of documentation is appropriate for a private function.

 Thanks again for taking the time to review and explain the reasoning
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36889#comment:7>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019c0c61037d-fc458243-d014-4d89-92dd-6cadbf71e9c5-000000%40eu-central-1.amazonses.com.

Reply via email to