Skip to content

Does it ever make sense to delete attributes? #76

Open

Description

@chaimleib

If not, should we remove the deleters, and make all attributes behave as 'required'?

-> If so, should we change the meaning of _props_req and _props?

Activity

  1. brianjmiller commented on Jul 23, 2014

    @brianjmiller
    Member

    What does the word "delete" mean in this case? If it is more akin to 'unset' or setting to undefined/null equivalent then that is certainly valid. If it means this object does not have a particular attribute anymore then it doesn't.

  2. chaimleib commented on Jul 23, 2014

    @chaimleib
    Author

    The second one. Trying to access a deleted attribute will result in an AttributeError

  3. brianjmiller commented on Jul 23, 2014

    @brianjmiller
    Member

    Then 👍 to getting rid of deleters, don't think there is ever a case where an attribute should be removed. Presumably they would set to None if they need to "clear" a value which would be common. I don't think need to change _props and _props_req as the 'req' there is more akin to 'required' by the LRS for valid object (at least I think, feel free to correct if wrong).

    Want to do the work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions