Python Forum
modifying the origin of an iterator
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modifying the origin of an iterator
#1
suppose i call iter() to create an iterator from a large list. if i subsequently modify that list, will that impact that iterator or is an iterator from iter() completely independent, such as by making a copy of the origin object passed in the call to iter()?

based on readings of the python documentation, it appears that the data object is used, but it does not indicate if that is a copy or not.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
modifying the origin of an iterator - by Skaperen - Mar-03-2020, 11:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  testing if an iterator is empty Skaperen 9 9,672 Feb-25-2022, 02:31 AM
Last Post: Skaperen
  multiplying an iterator Skaperen 9 3,476 Oct-12-2021, 07:07 PM
Last Post: Skaperen
  iterating an iterator by one step Skaperen 0 1,644 Feb-09-2021, 08:38 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020