is_operator function
This commit is contained in:
parent
a0fa09a381
commit
91bd108b53
@ -35,6 +35,22 @@ OPERATORS = {
|
||||
},
|
||||
}
|
||||
|
||||
def is_operator(string):
|
||||
""" Return whether a string is an operator or not
|
||||
|
||||
:param string: string to test
|
||||
:returns: boolean
|
||||
|
||||
:example:
|
||||
|
||||
>>> is_operator("+")
|
||||
True
|
||||
>>> is_operator("i")
|
||||
False
|
||||
|
||||
"""
|
||||
return string in OPERATORS.keys()
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# Reglages pour 'vim'
|
||||
|
Loading…
Reference in New Issue
Block a user