組み込み定義XXXXを再定義しています。
エラー例
pythonで定義されている組み込み関数等を上書きしているために発生します。dir = './home/temp'
print(dir)
解決方法
変数名を変更します。dirName = './home/temp'
print(dirName)
組み込み関数一覧
abs() | dict() | help() | min() | setattr() |
all() | dir() | hex() | next() | slice() |
any() | divmod() | id() | object() | sorted() |
ascii() | enumerate() | input() | oct() | staticmethod() |
bin() | eval() | int() | open() | str() |
bool() | exec() | isinstance() | ord() | sum() |
bytearray() | filter() | issubclass() | pow() | super() |
bytes() | float() | iter() | print() | tuple() |
callable() | format() | len() | property() | type() |
chr() | frozenset() | list() | range() | vars() |
classmethod() | getattr() | locals() | repr() | zip() |
compile() | globals() | map() | reversed() | __import__() |
complex() | hasattr() | max() | round() | |
delattr() | hash() | memoryview() | set() |
検証環境
- Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
- pylint 1.6.5
- Microsoft Windows 7 Professional Service Pack 1 (Microsoft Windows NT 6.1 (7601))