function in python

 functions in python are objects

func.__code__ and func.__defaults__

func.__code__ was func.func_code func.__defaults__ was func.func_defaults in python 2

>The default values are stored in func.__defaults__, and retrieved each time the function is called.

>the body of the function gets compiled and stored in variables under __code__
>the default arguments get stored in __defaults__

Function annotations are completely optional metadata information about the types used by user-defined functions Return annotations are defined by a literal ->, followed by an expression, between the parameter list and the colon denoting the end of the def statement

function documendation string :: short, concise summary of the object’s purpose written between triple quotes at start of function.



Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

fix idm integration on chrome

Hidden Wiki