Skip to content
Advertisement

Tag: final

`final` keyword equivalent for variables in Python?

I couldn’t find documentation on an equivalent of Java’s final in Python, is there such a thing? I’m creating a snapshot of an object (used for restoration if anything fails); once this backup variable is assigned, it should not be modified — a final-like feature in Python would be nice for this. Answer Having a variable in Java be final

Advertisement