Skip to content

hangman: Wondering why remaining_guesses vs get_status() #1910

@petertseng

Description

@petertseng

Just curious about https://github.com/exercism/python/blob/master/exercises/hangman/hangman_test.py - remaining_guesses is accessed directly (implying it is either a property or an instance variable) whereas there is a get_status() and get_masked_word(), getter instance methods.

Since I am not very familiar with Python conventions I don't have a good sense of when someone should use property vs getter instance method. Any explanation available for this exercise as to why the respective choices were taken? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions