About 51 results
Open links in new tab
  1. python - Immutable vs Mutable types - Stack Overflow

    Nov 9, 2011 · Here's a list of the most common mutable and immutable objects in Python. This list can be obtained by 1) painstakingly searching Python's official "Built-in Types" reference page for the …

  2. immutability - Check for mutability in Python? - Stack Overflow

    Dec 8, 2010 · User-defined types are always mutable. An object is mutable if it is not immutable. An object is immutable if it consists, recursively, of only immutable-typed sub-objects. Thus, a tuple of …

  3. python - Why does PyCharm warn about mutable default arguments?

    Default arguments value is mutable This inspection detects when a mutable value as list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at …

  4. Mutable strings in Python - Stack Overflow

    May 13, 2012 · 2 Efficient mutable strings in Python are arrays. PY3 Example for unicode string using array.array from standard library:

  5. Mutable and Immutable Strings in python - Stack Overflow

    Nov 14, 2017 · Strings are known as Immutable in Python (and other languages) because once the initial string is created, none of the function/methods that act on it change it directly, they simply …

  6. Mutabilidad vs Inmutabilidad (Python) - Stack Overflow en español

    Jun 11, 2021 · Y esto tiene sentido cuando vemos el comportamiento de Python en asignacion de valores. Cuando se tratan de cadenas, Python comprueba si el valor esta en la tabla de cadenas …

  7. python - "Least Astonishment" and the Mutable Default Argument

    Jul 16, 2009 · Nevertheless mutable arguments are still in line with Python Zen (Pep 20) and falls into "obvious for Dutch" (understood/exploited by hard core python programmers) clause. The …

  8. python - Why can tuples contain mutable items? - Stack Overflow

    Mar 18, 2012 · Python would have to use lists, which would probably slow things down, and would certainly be less memory efficient. So you see, in order to fulfill their purpose, tuples must be …

  9. python - are user defined classes mutable - Stack Overflow

    Aug 22, 2012 · All objects (with the exception of a few in the standard library, some that implement special access mechanisms using things like descriptors and decorators, or some implemented in C) …

  10. python - Mutable vs. Immutable object specifically lists - Stack Overflow

    May 30, 2021 · Mutable vs. Immutable object specifically lists [duplicate] Asked 4 years, 7 months ago Modified 4 years, 7 months ago Viewed 3k times