Skip to content

Ertugrul's Notebook

  • About
  • Contact
  • English
  • Türkçe

Tag: best practice

The Pitfalls of Using Mutable Default Arguments in Python

2023-09-062023-09-06

In Python, it can be convenient to define functions with default values. These are used when a value is not explicitly provided when the function is called: However, unexpected behavior can arise when using mutable objects, such as lists, as default values: You might expect that the players list would be empty each time this […]

Posted in Programming, PythonTagged best practice, programming, python

Exception Handling in Python

2023-05-282023-05-30

Exception handling is an integral part of coding in any language, and Python is no exception. However, one common mistake that developers often make is to catch all exceptions to avoid crashes. While this might seem like a good strategy to keep your program running, it can actually mask real issues and lead to hard-to-diagnose […]

Posted in Programming, PythonTagged best practice, coding, exception handling, programming, python, tips

Search

My apps

  • Masterlist
  • Lydian
  • Flashcards
  • Break the Code
  • Sayibul
© 2025 Ertugrul's Notebook • Slightly Theme