mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 13:44:48 +08:00
Be explicit about builtin functions
This commit is contained in:
@@ -341,7 +341,7 @@ endif
|
|||||||
"
|
"
|
||||||
|
|
||||||
if s:Enabled('g:python_highlight_builtin_funcs')
|
if s:Enabled('g:python_highlight_builtin_funcs')
|
||||||
let s:funcs_re = '__import__|abs|all|any|bin|callable|chr|classmethod|compile|complex|delattr|dir|divmod|enumerate|eval|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|map|max|min|memoryview|next|oct|open|ord|pow|property|range|repr|reversed|round|setattr|slice|sorted|staticmethod|sum|super|type|vars|zip'
|
let s:funcs_re = '__import__|abs|all|any|bin|callable|chr|classmethod|compile|complex|delattr|dir|divmod|enumerate|eval|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|map|max|memoryview|min|next|oct|open|ord|pow|property|range|repr|reversed|round|setattr|slice|sorted|staticmethod|sum|super|type|vars|zip'
|
||||||
|
|
||||||
if s:Python2Syntax()
|
if s:Python2Syntax()
|
||||||
let s:funcs_re .= '|apply|basestring|buffer|cmp|coerce|execfile|file|intern|long|raw_input|reduce|reload|unichr|unicode|xrange'
|
let s:funcs_re .= '|apply|basestring|buffer|cmp|coerce|execfile|file|intern|long|raw_input|reduce|reload|unichr|unicode|xrange'
|
||||||
|
|||||||
115
tests/test.py
115
tests/test.py
@@ -42,46 +42,99 @@ True False Ellipsis None NotImplemented
|
|||||||
|
|
||||||
bool bytearray dict float frozenset int list object set str tuple
|
bool bytearray dict float frozenset int list object set str tuple
|
||||||
|
|
||||||
|
# Builtin functions
|
||||||
|
|
||||||
|
__import__()
|
||||||
|
abs()
|
||||||
|
all()
|
||||||
|
any()
|
||||||
|
bin()
|
||||||
|
bool()
|
||||||
|
bytearray()
|
||||||
|
callable()
|
||||||
|
chr()
|
||||||
|
classmethod()
|
||||||
|
compile()
|
||||||
|
complex()
|
||||||
|
delattr()
|
||||||
|
dict()
|
||||||
|
dir()
|
||||||
|
divmod()
|
||||||
|
enumerate()
|
||||||
|
eval()
|
||||||
|
filter()
|
||||||
|
float()
|
||||||
|
format()
|
||||||
|
frozenset()
|
||||||
|
getattr()
|
||||||
|
globals()
|
||||||
|
hasattr()
|
||||||
|
hash()
|
||||||
|
help()
|
||||||
|
hex()
|
||||||
|
id()
|
||||||
|
input()
|
||||||
|
int()
|
||||||
|
isinstance()
|
||||||
|
issubclass()
|
||||||
|
iter()
|
||||||
|
len()
|
||||||
|
list()
|
||||||
|
locals()
|
||||||
|
map()
|
||||||
|
max()
|
||||||
|
memoryview()
|
||||||
|
min()
|
||||||
|
next()
|
||||||
|
object()
|
||||||
|
oct()
|
||||||
|
open()
|
||||||
|
ord()
|
||||||
|
pow()
|
||||||
|
property()
|
||||||
|
range()
|
||||||
|
repr()
|
||||||
|
reversed()
|
||||||
|
round()
|
||||||
|
set()
|
||||||
|
setattr()
|
||||||
|
slice()
|
||||||
|
sorted()
|
||||||
|
staticmethod()
|
||||||
|
str()
|
||||||
|
sum()
|
||||||
|
super()
|
||||||
|
tuple()
|
||||||
|
type()
|
||||||
|
vars()
|
||||||
|
zip()
|
||||||
|
|
||||||
# Builtin functions: Python 2
|
# Builtin functions: Python 2
|
||||||
|
|
||||||
abs() divmod() input() open() staticmethod()
|
|
||||||
all() enumerate() int() ord() str()
|
|
||||||
any() eval() isinstance() pow() sum()
|
|
||||||
basestring() execfile() issubclass() print() super()
|
|
||||||
bin() file() iter() property() tuple()
|
|
||||||
bool() filter() len() range() type()
|
|
||||||
bytearray() float() list() raw_input() unichr()
|
|
||||||
callable() format() locals() reduce() unicode()
|
|
||||||
chr() frozenset() long() reload() vars()
|
|
||||||
classmethod() getattr() map() repr() xrange()
|
|
||||||
cmp() globals() max() reversed() zip()
|
|
||||||
compile() hasattr() memoryview() round() __import__()
|
|
||||||
complex() hash() min() set()
|
|
||||||
delattr() help() next() setattr()
|
|
||||||
dict() hex() object() slice()
|
|
||||||
dir() id() oct() sorted()
|
|
||||||
|
|
||||||
apply()
|
apply()
|
||||||
|
basestring()
|
||||||
buffer()
|
buffer()
|
||||||
|
cmp()
|
||||||
coerce()
|
coerce()
|
||||||
|
execfile()
|
||||||
|
file()
|
||||||
intern()
|
intern()
|
||||||
|
long()
|
||||||
|
raw_input()
|
||||||
|
reduce()
|
||||||
|
reload()
|
||||||
|
unichr()
|
||||||
|
unicode()
|
||||||
|
xrange()
|
||||||
|
|
||||||
|
print()
|
||||||
|
|
||||||
# Builtin functions: Python 3
|
# Builtin functions: Python 3
|
||||||
|
|
||||||
abs() dict() help() min() setattr()
|
ascii()
|
||||||
all() dir() hex() next() slice()
|
bytes()
|
||||||
any() divmod() id() object() sorted()
|
exec()
|
||||||
ascii() enumerate() input() oct() staticmethod()
|
print()
|
||||||
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()
|
|
||||||
|
|
||||||
# Builtin exceptions and warnings.
|
# Builtin exceptions and warnings.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user