Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Use property decorator where possible #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ueg1990
Copy link
Contributor

@ueg1990 ueg1990 commented Sep 4, 2015

More Pythonic way of controlling access to instance variables.
From https://docs.python.org/2/howto/descriptor.html:
"The property() builtin helps whenever a user interface has granted attribute access and then subsequent changes require the intervention of a method."

@zvyn
Copy link

zvyn commented Feb 2, 2017

I disagree with using getter functions or properties there.

Properties are a nice way of changing/extending "variable" behaviour but if the behaviour is that of a normal variable, there is no need for that.

I'm mainly commenting to see if you have an argument against my current opinion (also I'm not working for or am I in any way associated with Imgur) :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants