Skip to content

Commit 915a813

Browse files
committed
less useless printing
1 parent 2eac22e commit 915a813

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

defining-functions.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ This function can be called in two ways:
206206
hi
207207
>>>
208208

209-
Positional arguments are great for simple things like
210-
`print("hello")`, but if your function takes many positional
211-
arguments it may be hard to tell which argument is which.
209+
Positional arguments are great for simple things, but if your
210+
function takes many positional arguments it may be hard to tell
211+
which argument is which.
212212

213213
- Using a **keyword argument**:
214214

@@ -227,7 +227,8 @@ This function can be called in two ways:
227227
it.
228228

229229
Personally, I would use this function with a positional argument. It
230-
only takes one argument.
230+
only takes one argument, so I don't need to worry about which argument
231+
is which.
231232

232233
Now it's time to solve our box printing problem:
233234

@@ -272,16 +273,13 @@ that doesn't specify what to return, our function will return None.
272273

273274
```py
274275
>>> def return_none_1():
275-
... print("This will return None.")
276+
... pass
276277
...
277278
>>> def return_none_2():
278-
... print("This will also return None.")
279279
... return
280280
...
281281
>>> x = return_none_1()
282-
This will return None.
283282
>>> y = return_none_2()
284-
This will also return None.
285283
>>> print(x, y)
286284
None None
287285
>>>

0 commit comments

Comments
 (0)