Why Your Python Functions Are Secretly Changing Data You Never Passed to Them episode artwork

EPISODE · May 28, 2026 · 8 MIN

Why Your Python Functions Are Secretly Changing Data You Never Passed to Them

from Programming Tech Brief By HackerNoon · host HackerNoon

This story was originally published on HackerNoon at: https://hackernoon.com/why-your-python-functions-are-secretly-changing-data-you-never-passed-to-them. Python's mutable default bug silently grows your lists across calls. Learn why it happens, how to fix it, and when it's actually intentional. Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #python, #python-programming, #python-tutorials, #python-debugging, #mutable-objects, #python-functions, #bugs, #hackernoon-top-story, and more. This story was written by: @sohelalam79. Learn more about this writer by checking @sohelalam79's about page, and for more stories, please visit hackernoon.com. You defined a function with a list as a default argument. Now, it's accumulating data across calls you never connected.

Episode metadata supplied by the publisher feed · Published May 28, 2026

Embed this episode

NOW PLAYING

Why Your Python Functions Are Secretly Changing Data You Never Passed to Them

0:00 8:18

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of Programming Tech Brief By HackerNoon?

This episode is 8 minutes long.

When was this Programming Tech Brief By HackerNoon episode published?

This episode was published on May 28, 2026.

Can I download this Programming Tech Brief By HackerNoon episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!