码迷,mamicode.com
首页 > 编程语言 > 详细

python TypeError: 'builtin_function_or_method' object is not iterable keys

时间:2017-06-22 21:49:46      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:files   typeerror   end   key   ati   pos   cti   content   app   

            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

标签:files   typeerror   end   key   ati   pos   cti   content   app   

原文地址:http://www.cnblogs.com/claireyuancy/p/7067087.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!