Python Forum
What is the meaning of mutable data type?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the meaning of mutable data type?
#2
mutable
Mutable objects can change their value but keep their id().

immutable
An object with a fixed value. Immutable objects include numbers, strings and tuples. Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an important role in places where a constant hash value is needed, for example as a key in a dictionary.
Reply


Messages In This Thread
What is the meaning of mutable data type? - by qliu - Apr-17-2020, 02:51 PM
RE: What is the meaning of mutable data type? - by Yoriz - Apr-17-2020, 03:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  using mutable in function defintion as optional paramter akbarza 8 519 Apr-27-2024, 09:59 PM
Last Post: snippsat
  Unable to understand the meaning of the line of code. jahuja73 0 340 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  mutable argument in function definition akbarza 1 522 Dec-15-2023, 02:00 PM
Last Post: deanhystad
  Csv writer meaning of quoting mg24 2 1,201 Oct-01-2022, 02:16 PM
Last Post: Gribouillis
  mutable values to string items? fozz 15 2,969 Aug-30-2022, 07:20 PM
Last Post: deanhystad
  meaning of -> syntax in function definition DrakeSoft 5 2,030 Apr-09-2022, 07:45 AM
Last Post: DrakeSoft
  Operator meaning explanation Sherine 3 2,087 Jul-31-2021, 11:05 AM
Last Post: Sherine
  blank graph with matplotlib from a csv file / data type issue arsentievalex 0 1,977 Apr-06-2021, 10:08 AM
Last Post: arsentievalex
  What type of *data* is the name of a list/tuple/dict, etc? alloydog 9 4,451 Jan-30-2021, 07:11 AM
Last Post: alloydog
  "'DataFrame' objects are mutable, thus they cannot be hashed" Mark17 1 6,886 Dec-25-2020, 02:31 AM
Last Post: tinh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020