A
A
avtorlego2017-06-15 17:44:40
JavaScript
avtorlego, 2017-06-15 17:44:40

Is it possible to set a parameter in the def function that may or may not exist?

There is, for example
, def send(test, tost):
is it possible to make the 2nd parameter as well as specify and do without it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2018-10-30
@Rsa97

jquery-ui connected?
On $('#date_to_vis').datepicker(...) does not give an error, most likely because it does not reach this line, crashes with an error earlier.

A
Alexander, 2017-06-15
@fireSparrow

def send(test, tost=None):
    if tost is None:
        # Выполняем какие-то действия если был указан только первый аргумент
    else:
        # Выполняем какие-то действия, если были указаны оба аргумента

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question