Skip to content

Commit 72f639f

Browse files
authored
Merge pull request #438 from datacarpentry/maneesha-patch-2
Add a reminder about what the question mark does
2 parents b45f473 + c10d144 commit 72f639f

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

_episodes/06-loops-and-functions.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,25 @@ The text between the two sets of triple double quotes is called a docstring and
398398
contains the documentation for the function. It does nothing when the function
399399
is running and is therefore not necessary, but it is good practice to include
400400
docstrings as a reminder of what the code does. Docstrings in functions also
401-
become part of their 'official' documentation:
401+
become part of their 'official' documentation, and we can see them by typing
402+
`help(function_name)`:
403+
404+
~~~
405+
help(one_year_csv_writer)
406+
~~~
407+
{: .language-python }
408+
409+
~~~
410+
Help on function one_year_csv_writer in module __main__:
411+
412+
one_year_csv_writer(this_year, all_data)
413+
Writes a csv file for data from a given year.
414+
this_year -- year for which data is extracted
415+
all_data -- DataFrame with multi-year data
416+
~~~
417+
{: .output }
418+
419+
Or, when working in the Jupyter environment, adding a `?` (question mark) after the function name:
402420

403421
~~~
404422
one_year_csv_writer?

0 commit comments

Comments
 (0)