awesome-repositories.com
Blog
MCP
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectServer MCPDespreCum realizăm clasamentulPresă
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

3 repository-uri

Awesome GitHub RepositoriesMutable Default Argument Guards

Patterns that prevent hidden shared state by using None as a sentinel and reassigning the mutable value inside the function body.

Distinct from Default Arguments: Distinct from Default Arguments: focuses specifically on the Python anti-pattern of mutable default arguments and the guard pattern to avoid it.

Explore 3 awesome GitHub repositories matching programming languages & runtimes · Mutable Default Argument Guards. Refine with filters or upvote what's useful.

Awesome Mutable Default Argument Guards GitHub Repositories

Găsește cele mai bune repo-uri cu AI.Vom căuta cele mai potrivite repository-uri folosind AI.
  • chalarangelo/30-seconds-of-pythonAvatar Chalarangelo

    Chalarangelo/30-seconds-of-python

    8,826Vezi pe GitHub↗

    30 Seconds of Python is a curated collection of short, reusable Python code snippets designed for quick reference and immediate reuse. It provides an interactive browser that lets you explore snippets organized by tags, search across names and descriptions, and copy code to your clipboard with a single click. The collection covers a broad range of common programming tasks, including list and dictionary operations, string formatting and manipulation, date and time calculations, and color format conversion. It also includes utilities for data transformation, such as converting between case styl

    Provides a code snippet demonstrating how to avoid mutable default arguments in Python functions.

    Pythoneducationlearn-to-codelearning-resources
    Vezi pe GitHub↗8,826
  • jackzhenguo/python-small-examplesAvatar jackzhenguo

    jackzhenguo/python-small-examples

    8,132Vezi pe GitHub↗

    This project is a comprehensive library of practical Python code examples and patterns. It provides a collection of scripts and snippets designed to demonstrate a wide range of programming tasks, from basic syntax to advanced implementation patterns. The repository focuses on several core domains, including the implementation of concurrency and multithreading examples, data analysis snippets for cleaning and manipulating tabular data, and various data visualization examples. It also covers automation scripts for file system management and a variety of general programming patterns. Additional

    Implements guards against the mutable default argument anti-pattern by using None as a sentinel.

    Pythondata-sciencemachine-learningpython
    Vezi pe GitHub↗8,132
  • python-attrs/attrsAvatar python-attrs

    python-attrs/attrs

    5,799Vezi pe GitHub↗

    attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it

    Provides per-instance mutable default values via factory functions, avoiding shared-state bugs in data classes.

    Python
    Vezi pe GitHub↗5,799
  1. Home
  2. Programming Languages & Runtimes
  3. Function Argument Passing
  4. Default Arguments
  5. Mutable Default Argument Guards

Explorează sub-etichetele

  • Per-Instance Mutable DefaultsMechanisms that create fresh copies of mutable default values for each instance to prevent shared-state bugs. **Distinct from Mutable Default Argument Guards:** Distinct from Mutable Default Argument Guards: focuses on class attribute defaults with per-instance copying, not function argument guard patterns.