GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — programmingWithPythonCode/syntax/function.py at main · thomasWeise/programmingWithPythonCode

Expand file tree

/

function.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
23 lines (18 loc) · 940 Bytes
/

function.py

Copy path

File metadata and controls

23 lines (18 loc) · 940 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""The syntax of function definitions and function calls."""
def my_function(param_1: type_hint, param_2: type_hint) -> result_type:
"""
Short sentence describing the function.
The title of the so-called docstring is a short sentence stating
what the function does. It can be followed by several paragraphs of
text describing it in more detail. Then follows the list of
parameters, return values, and raised exceptions (if any).
:param param_1: the description of the first parameter (if any)
:param param_2: the description of the second parameter (if any)
:returns: the description of the return value (unless `-> None`).
"""
body of function 1
body of function 2
return result # if result_type is not None we return something
normal statement 1 # some random code outside of the function
normal statement 2
my_function(argument_1, argument_2) # We call the function like this.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.