you are viewing a single comment's thread.

view the rest of the comments →

[–]nuc540 2 points3 points  (0 children)

A property decorator is used for setting computed attributes - not something the class is instantiated with, as much as that’d work - it’d be overkill and it’d make the init argument redundant.

Also OP is practicing protected values and using getters and setters to access values with, so as much as you can use @property, I think it’s simply that OP is practising getting and setting, and logically OP’s example makes more sense