May I ask why the maximum depth limit is still exceeded in recursion limit=3000?

class sorted_list(object):
    def __init__(self,elements):
        self.elements=sorted(elements)
    def __iter__(self):
        self.position=-1
        return self
    def __next__(self):
        if self.position == len(self.elements)-1:
            raise StopIteration
            self.position+=1
        return self.elements[self.position]
    
namelist=["a","d","c"]
sorted_namelist=sorted_list(namelist)-sharp 
for name in sorted_namelist:
    print(name)
Apr.05,2022

indent problem

    def __next__(self):
        if self.position == len(self.elements)-1:
            raise StopIteration
            self.position+=1

to change to

    def __next__(self):
        if self.position == len(self.elements)-1:
            raise StopIteration
        self.position+=1
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5655a-440cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5655a-440cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?