For a long time i have been trying to figure out what is the best way to pass flags to python functions. The most straightforward way is something like:
def func
you can define flag1 ...flagN as global variables, and define your function with func( *args)
flag1
flagN
func( *args)
FLAG1 = 1 FLAG2 = 2 def func(*args): pass func(FLAG1, FLAG2)
By defining flags separately, instead of using string, you can avoid typos in flags' names and some headache when debugging