Support optional argument-less parameters

Add more options to example.py to test optional argument-less
parameters.
expand_optional_param(): improve comments
Use a consistent variable name for a RE match