+ 2

Python function parameters

While I was reading through a documentation of a library in python,and i came across functions with a weird syntax,like this: def echo(update: Update, context: CallbackContext): __some code___ My question is why parameters were written like this,and what are they used for? Are they default values, or kind of assignment?

12th Feb 2022, 12:39 PM
Alaa Aldeen Shammr
Alaa Aldeen Shammr - avatar
4 Answers
+ 2
ravilnicki Thanks a million I appreciate your effort 🙏
12th Feb 2022, 1:08 PM
Alaa Aldeen Shammr
Alaa Aldeen Shammr - avatar
0
ravilnicki Is it okay if I didn't write them?
12th Feb 2022, 1:02 PM
Alaa Aldeen Shammr
Alaa Aldeen Shammr - avatar