Entries published on December 21, 2023
Don’t use Python’s property
This is part of a series of posts I’m doing as a sort of Python/Django Advent calendar, offering a small tip or piece of information each day from the first Sunday of Advent through Christmas Eve. See the first post for an introduction.
Attributing the problem
Suppose you’re writing Java and you write a class with an attribute :
public class MyClass {
public int value;
}
And then later on you realize that value
really wants to have some extra work happen at runtime — maybe it actually needs to be calculated “live” from other values, or needs auditing …