Skip to content

Commit 4718195

Browse files
bobahopBethanyG
authored andcommitted
Update about.md
1 parent e994ef9 commit 4718195

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

concepts/decorators/about.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def decorated_function2():
3131
pass
3232
```
3333

34-
If a decorator has defined default arguments, you must use parenthesis in the `@decorator()` call for the decorator to work:
34+
If a decorator has defined default arguments, you must use parenthesis in the `@decorator()` call for the decorator to work, as you would in calling any function:
3535

3636
```python
3737
@decorator_with_default_arg()
@@ -152,8 +152,8 @@ The inner function returns either `func` or, if `planet` equals `Pluto`, it will
152152
It could be coded to raise a `ValueError` instead.
153153
So, the inner function wraps `func`, and returns either `func` or does something that substitutes what `func` would do.
154154
The decorator returns its _inner function_.
155-
It does not _directly_ return the original, passed-in function.
156-
Depending on what happens in the wrapper function, `func` may or may not be returned.
155+
The _inner_function_ may or may not return the original, passed-in function.
156+
Depending on what code conditionally executes in the wrapper function or _inner_function_, `func` may be returned, an error could be raised, or a value of `func`'s return type could be returned.
157157

158158
### Decorating a Function that Takes an Arbitrary Number of Arguments
159159

@@ -178,7 +178,7 @@ Following is an example of a decorator for a function that takes an arbitrary nu
178178
```
179179

180180
This works for doubling the return value from the function argument.
181-
If we want to triple, quadruple, etc. the return value, we can add a parameter to the decorator itself., as we show in the next section.
181+
If we want to triple, quadruple, etc. the return value, we can add a parameter to the decorator itself, as we show in the next section.
182182

183183
### Decorators Which Have Their own Parameters
184184

0 commit comments

Comments
 (0)