python TypeError: 'builtin_function_or_method' object is not iterable keys

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python TypeError: 'builtin_function_or_method' object is not iterable keys相关的知识,希望对你有一定的参考价值。

            statinfo = os.stat( OneFilePath )
            if AllFiles.has_key( statinfo.st_size ):
                OneKey = AllFiles[ statinfo.st_size ]
                OneKey.append( OneFilePath )
                AllFiles[ statinfo.st_size ] = OneKey
            else:
                if statinfo.st_size  > MinSize:
#                    print statinfo.st_size
                    AllFiles[ statinfo.st_size] = [ OneFilePath ]




is changed to


            statinfo = os.stat( OneFilePath )
            if AllFiles.has_key( statinfo.st_size ):
                OneKey = AllFiles[ statinfo.st_size ]
                OneKey.append( OneFilePath )
                AllFiles[ statinfo.st_size ] = OneKey
            else:
                if statinfo.st_size  > MinSize:
#                    print statinfo.st_size
                    FileSize = statinfo.st_size
                    AllFiles[ FileSize ] = [ OneFilePath ]


















以上是关于python TypeError: 'builtin_function_or_method' object is not iterable keys的主要内容,如果未能解决你的问题,请参考以下文章

TypeError:'int'对象不可迭代,使用 Python 3 [关闭]

TypeError:需要一个类似字节的对象,而不是'str'-python 2到3 [重复]

TypeError:预期的整数参数,浮点数,带pygame的python 3.6.3

Python 3:super() 意外引发 TypeError

TypeError:'State'和'State' PYTHON 3的实例之间不支持'<'

Python 3.8 TypeError: can't concat str to bytes - TypeError: a bytes-like object is required, not 's