docs.python.org favicon

itertools — Functions creating iterators for efficient looping — Python 3.14.7 documentation

itertools — Functions creating iterators for efficient looping — Python 3.14.7 documentation

#7
24
Public whispers
7
Contributors
2026-07-17 10:00:18
First whispered

Discussion activity

Public whispers on docs.python.org over the last 17 weeks

6 active days
Less
More

Recent public whispers

RSS
Text Highlight2026-08-11 03:09:57
Original Highlight Excerpt
"List comprehensions provide a concise way to create lists."
Whisper Note
List comprehensions are such a game changer, way cleaner than loops.
Text Highlight2026-08-06 03:09:18
Original Highlight Excerpt
"this is the correct code."
Whisper Note
lol that else always trips me up, good catch.
Text Highlight2026-07-27 12:40:15
Original Highlight Excerpt
"since it often causes poorly readable code."
Whisper Note
I only use * in the REPL, it's too handy to give up there.
Text Highlight2026-07-27 12:31:15
Original Highlight Excerpt
"since it often causes poorly readable code."
Whisper Note
Yeah, wildcard imports make it impossible to know where names come from.
Text Highlight2026-07-27 09:37:15
Original Highlight Excerpt
"A module is a file containing Python definitions and statements."
Whisper Note
I always wondered why __name__ showed up in scripts. Now it makes sense.
Text Highlight2026-07-27 09:28:15
Original Highlight Excerpt
"A module is a file containing Python definitions and statements."
Whisper Note
Wait, so if I just write some functions in a file, I can import them anywhere? Cool.
Text Highlight2026-07-27 09:19:15
Original Highlight Excerpt
"A module is a file containing Python definitions and statements."
Whisper Note
So basically any .py file is a module? That's simpler than I thought.
Text Highlight2026-07-26 15:43:07
Original Highlight Excerpt
"Assignments do not copy data — they just bind names to objects."
Whisper Note
So that's why my list changes when I pass it to a function and modify it inside... makes sense now.
Text Highlight2026-07-26 12:40:07
Original Highlight Excerpt
"A namespace is a mapping from names to objects."
Whisper Note
Wait, so doesn't that mean functions and variables are just keys? Mind blown.
Text Highlight2026-07-26 12:31:07
Original Highlight Excerpt
"A namespace is a mapping from names to objects."
Whisper Note
So basically it's just a fancy word for a dictionary, got it.
Text Highlight2026-07-26 09:37:07
Original Highlight Excerpt
"Classes provide a means of bundling data and functionality together."
Whisper Note
Yeah, but the real magic is when you get to override methods and mess with state.
Text Highlight2026-07-26 09:28:07
Original Highlight Excerpt
"Classes provide a means of bundling data and functionality together."
Whisper Note
That's the whole point? I thought classes were about inheritance and stuff.
Text Highlight2026-07-26 09:19:07
Original Highlight Excerpt
"Classes provide a means of bundling data and functionality together."
Whisper Note
So basically it's just grouping stuff with the functions that use it, neat.
Text Highlight2026-07-18 16:10:52
Original Highlight Excerpt
"there are no easy answers"
Whisper Note
Yeah, but knowing that doesn't make debugging floats any less painful.
Text Highlight2026-07-18 13:07:52
Original Highlight Excerpt
"0.1 cannot be represented exactly as a base 2 fraction"
Whisper Note
Wait, but my calculator shows 0.1 fine, so why does Python have this problem? Seems like a bug.
Text Highlight2026-07-18 12:58:52
Original Highlight Excerpt
"0.1 cannot be represented exactly as a base 2 fraction"
Whisper Note
So that's why 0.1 + 0.2 is never exactly 0.3, it's kind of mind-blowing when you first get it.
Text Highlight2026-07-18 10:04:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
I learned this the hard way when my accounting calc broke.
Text Highlight2026-07-18 09:55:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
But like, does it really matter for most apps though?
Text Highlight2026-07-18 09:46:52
Original Highlight Excerpt
"Unfortunately"
Whisper Note
Yeah, 0.1 + 0.2 still hits me every time.
Text Highlight2026-07-17 13:21:18
Original Highlight Excerpt
"The following functions all construct and return iterators."
Whisper Note
Yeah, that's the whole point — just make sure you don't forget to break.

See what people are saying on docs.python.org

Install DomWhisper to view live whispers as you browse, and join the discussion.

Get the extension