Code conversion tools, mostly just for removing dependencies so far. Eliminates various issues and .NET calls such as introduced by icsharpcode snippet converter C# to Python translation. NOTE: Should be rewritten to use SLY.
(string, index): must be handled differently (transform code or emit a new function to handle that)
Example:
def IsSpace(*args):
'''
Sequential arguments:
1st (args[0]) -- String to check as a whole or as a character
2nd (args[1]) -- If present, the second param is the index in
args[0] to check and no other parts of args[0] will
be checked.
'''
if len(args) == 1:
return str.isspace(args[0])
elif len(args) == 2:
return str.isspace(args[0][args[1]])
raise ValueError("IsSpace only takes (charStr)"
" or (str, index)")
overloads:
Example: