Skip to content
Advertisement

Python property setter only

I have a class with property decorator.

JavaScript

But I don’t need the getter, can I have property with only the setter?

It’s most more a curiosity.

Advertisement

Answer

The simplest way IMHO is

JavaScript

Demo:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement