chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54376b
)
documentation/python: special handling for self only if it's first.
author
Vladimír Vondruš
<mosra@centrum.cz>
Tue, 27 Aug 2019 19:13:21 +0000
(21:13 +0200)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Wed, 28 Aug 2019 14:36:13 +0000
(16:36 +0200)
I doubt anyone sane will name any other function parameters like that, but
let's be sure.
documentation/python.py
patch
|
blob
|
history
diff --git
a/documentation/python.py
b/documentation/python.py
index bf38994fd12a45242b6702b32b94c9d405291508..7ddaec8e10dad188c7e14d4c390a29a5d9071eb2 100755
(executable)
--- a/
documentation/python.py
+++ b/
documentation/python.py
@@
-1095,7
+1095,7
@@
def extract_function_doc(state: State, parent, entry: Empty) -> List[Any]:
param = Empty()
param.name = name
# Don't include redundant type for the self argument
- if name == 'self':
+ if
i == 0 and
name == 'self':
param.type = None
arg_types += [None]
else: