1 | | I'm not sure that we need to include an example, since the iterator protocol is Python and not Django, and is documented in python docs [https://docs.python.org/3/tutorial/classes.html#iterators here], and emulating container types is documented [https://docs.python.org/3/reference/datamodel.html#emulating-container-types here]. Considering that, maybe a link to the docs or to an excellent tutorial may suffice, or we risk straying out of the scope Django docs and into into core Python fundamentals. |
| 1 | I'm not sure that we need to include an example, since the iterator protocol is Python and not Django, and is documented in python docs [https://docs.python.org/3/tutorial/classes.html#iterators here], and emulating container types is documented [https://docs.python.org/3/reference/datamodel.html#emulating-container-types here]. Considering that, maybe a link to the docs or to an excellent tutorial should suffice, or we risk straying out of the scope Django docs and into into core Python fundamentals. |