We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54f4a9b commit 833161cCopy full SHA for 833161c
contents/stable_marriage_problem/code/python/stable_marriage.py
@@ -79,6 +79,7 @@ def __init__(self, name):
79
self.pref_index = 0
80
self._partner = None
81
82
+ @property
83
def next_choice(self):
84
"""Return the next person in the own preference list"""
85
if self.pref_index >= len(self.preference):
@@ -88,7 +89,7 @@ def next_choice(self):
88
89
90
def propose_to_next(self):
91
"""Propose to the next person in the own preference list"""
- person = self.next_choice()
92
+ person = self.next_choice
93
person.candidates.append(self)
94
self.pref_index += 1
95
0 commit comments