8000 gh-112205: Support docstring for `@getter` by corona10 · Pull Request #113160 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112205: Support docstring for @getter #113160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 20, 2023
Prev Previous commit
Next Next commit
Update Tools/clinic/clinic.py
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
  • Loading branch information
corona10 and erlend-aasland authored Dec 19, 2023
commit 6bb8272eaf2d7acf141e94a95ab3a0212a5724d5
2 changes: 1 addition & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ def output_templates(
docstring_prototype = docstring_definition = ''
elif f.kind is SETTER:
if f.docstring:
fail("@setter can not set docstring")
fail("docstrings are only supported for @getter, not @setter")
return_value_declaration = "int {return_value};"
methoddef_define = self.SETTERDEF_PROTOTYPE_DEFINE
docstring_prototype = docstring_definition = ''
Expand Down
0