Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python default parameters depend on other paramters

def func(n=5.0, delta=None):  # other ways are not supported
     if delta is None:
         delta = n/10
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #default #parameters #depend #paramters
ADD COMMENT
Topic
Name
2+6 =