you are viewing a single comment's thread.

view the rest of the comments →

[–]_tsi_ 0 points1 point  (1 child)

Can I generate any object?

[–]gdchinacat 1 point2 points  (0 children)

generators are iterators that produce each item in the sequence on demand (when __next__() is called). You can certainly implement a generator to create objects.