Section: Functions

Keyword-only args

python
python
def resize(image, *, width: int, height: int):
    return image, width, height

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Functions
Define a function
Define a function
OpenIn sheetpythonsame section
Default parameter
Default parameter
OpenIn sheetpythonsame section
Arbitrary positional args
Arbitrary positional args
OpenIn sheetpythonsame section
Arbitrary keyword args
Arbitrary keyword args
OpenIn sheetpythonsame section
Lambda as key
Lambda as key
OpenIn sheetpythonsame section
Unpack args into a call
Unpack args into a call
OpenIn sheetpythonsame section