Built-in Methods for Python Data Types

Mutable and Immutable Data Types In Python, data types are categorized into mutable (modifiable after creation) and immutable (unmodifiable after creation) types. This classification replaces the traditional "pass-by-value" or "pass-by-reference" distinction in other languages. Immutable Data Types Immutable types include st ...

Posted on Tue, 22 Sep 2026 16:43:09 +0000 by imstupid

Custom Memory Management and Access Tracking in C++

Tracking Member Variable Access Count To monitor how often a specific member variable is accessed, one approach uses the mutable keyword: #include <iostream> using namespace std; class Counter { private: int value; mutable int access_count; public: Counter(int v) : value(v), access_count(0) {} void setValue(int v) { ...

Posted on Mon, 21 Sep 2026 16:43:15 +0000 by TobesC

Mutable and Immutable Types in Python

When learning Python, you will inevitably encounter the concepts of mutable and immutable data types. All the discussions below are based on memory addresses. Immutable data types: When the value of a variable of this type changes, its corresponding memory address also changes. Such data types are called immutable. Mutable data types: When the ...

Posted on Sun, 24 May 2026 16:39:36 +0000 by riddlejk