Skip to content

Commit cc7d55c

Browse files
derek73claude
andcommitted
Remove broken dead SetManager.__next__ method
SetManager.__iter__ returns iter(self.elements), so the for-loop protocol never calls __next__ on the SetManager itself. The method also had two concrete bugs: self.count was never initialized and self.elements (a set) is not subscriptable. No callers exist. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e9fd487 commit cc7d55c

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

nameparser/config/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ def __contains__(self, value):
7373
def __len__(self):
7474
return len(self.elements)
7575

76-
def __next__(self):
77-
if self.count >= len(self.elements):
78-
self.count = 0
79-
raise StopIteration
80-
else:
81-
c = self.count
82-
self.count = c + 1
83-
return getattr(self, self.elements[c]) or next(self)
84-
8576
def add_with_encoding(self, s, encoding=None):
8677
"""
8778
Add the lower case and no-period version of the string to the set. Pass an

0 commit comments

Comments
 (0)