Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Comments

Close side panel

Use property decorator where possible#42

Open
ueg1990 wants to merge 1 commit intoImgur:masterImgur/imgurpython:masterfrom
ueg1990:use_propertyueg1990/imgurpython:use_propertyCopy head branch name to clipboard
Open

Use property decorator where possible#42
ueg1990 wants to merge 1 commit intoImgur:masterImgur/imgurpython:masterfrom
ueg1990:use_propertyueg1990/imgurpython:use_propertyCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.