Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
__iter__タプルのサブクラスで無効化したい。私はこのようにします:
__iter__
def __iter__(self): raise TypeError("'%s' object is not iterable" % self.__class__.__name__)
しかし、それは正しい方法ではないようです。誰でも助けることができますか?