0 votes
in Data Handling by
When can you use iterators in Django ORM?

1 Answer

0 votes
by

Iterators in Python are basically containers that consist of a countable number of elements. Any object that is an iterator implements two methods which are, the __init__() and the __next__()  methods. When you are making use of iterators in Django, the best situation to do it is when you have to process results that will require a large amount of memory space. To do this, you can make use of the iterator() method which basically evaluates a QuerySet and returns the corresponding iterator over the results.

Related questions

+1 vote
asked Apr 4, 2020 in Data Handling by amita rallin
0 votes
asked Apr 4, 2020 in Data Handling by amita rallin
...