首页 > 编程语言 > 详细

python TypeError: 'builtin_function_or_method' object is not iterable keys

时间:2015-08-10 00:16:57      阅读:1015      评论:0      收藏:0      [点我收藏+]
            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

原文:http://blog.csdn.net/llrraa2010/article/details/47383913

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!