---
title: "Discussion on \"Python's mutable default argument bug, run one call at a time\" | Hashnode"
description: "Discussion on \"Python's mutable default argument bug, run one call at a time\". Why a list default keeps growing between calls, how to see it with __defaults__, the None fix, and two places the same bug hides."
url: "https://hashnode.com/posts/python-s-mutable-default-argument-bug-run-one-call-at-a-time/6ae017fdb9edb22e5287a6eb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Python's mutable default argument bug, run one call at a time](https://realdev9868.hashnode.dev/python-s-mutable-default-argument-bug-run-one-call-at-a-time?utm_source=hashnode&utm_medium=feed)

Why a list default keeps growing between calls, how to see it with \_\_defaults\_\_, the None fix, and two places the same bug hides.

Oct 27 · 6 min read · realdev9868.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#programming-ciovqvfcb008mb253jrczo9ye](https://hashnode.com/tag/programming-ciovqvfcb008mb253jrczo9ye)
-   [#debugging](https://hashnode.com/tag/debugging)

## Written by

[Real Dev](https://hashnode.com/@realdev9868)

@realdev9868

  
[View profile](https://hashnode.com/@realdev9868)

Free interactive coding practice for students and developers. SQL, DSA, Python and more. From the Schoolabe team.

Free interactive coding practice for students and developers. SQL, DSA, Python and more. From the Schoolabe team.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
