Skip to content

use @property decorators instead of set_ and get_ methods #53

@davemfish

Description

@davemfish

It's arguably more pythonic to always set attributes through assignment rather than with a method call.

resource.title = 'foo'

instead of,

resource.set_title('foo')

Both work now, so the proposal here would remove the set_title interface and force use of the former. The benefit of this is that we can make future changes to the setter function without breaking any user code.

For more complicated attributes we might want to keep methods like set_field_description and set_band_description.

I don't think we should make any changes right away, but should keep this issue in mind as we do #29 , since that issue might necessitate some refactoring also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    on holdthere's a reason we aren't working on this yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions