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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit
  • Loading branch information
corona10 committed Dec 15, 2023
commit cf1a3a52e62f94cda50cc294d5c10669e72484ba
12 changes: 6 additions & 6 deletions Lib/test/clinic.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4957,9 +4957,9 @@ Test.property
[clinic start generated code]*/

#if defined(Test_property_HAS_DOCSTR)
# define Test_property_DOCSTR Test_property__doc__
# define Test_property_DOCSTR Test_property__doc__
#else
# define Test_property_DOCSTR NULL
# define Test_property_DOCSTR NULL
#endif
#if defined(TEST_PROPERTY_GETSETDEF)
# undef TEST_PROPERTY_GETSETDEF
Expand All @@ -4979,17 +4979,17 @@ Test_property_get(TestObj *self, void *Py_UNUSED(context))

static PyObject *
Test_property_get_impl(TestObj *self)
/*[clinic end generated code: output=1bfac7190f65014a input=2d92b3449fbc7d2b]*/
/*[clinic end generated code: output=27b519719d992e03 input=2d92b3449fbc7d2b]*/

/*[clinic input]
@setter
Test.property
[clinic start generated code]*/

#if defined(TEST_PROPERTY_HAS_DOCSTR)
# define Test_property_DOCSTR Test_property__doc__
# define Test_property_DOCSTR Test_property__doc__
#else
# define Test_property_DOCSTR NULL
# define Test_property_DOCSTR NULL
#endif
#if defined(TEST_PROPERTY_GETSETDEF)
# undef TEST_PROPERTY_GETSETDEF
Expand All @@ -5009,7 +5009,7 @@ Test_property_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))

static int
Test_property_set_impl(TestObj *self, PyObject *value)
/*[clinic end generated code: output=44050814a89e3dc5 input=3bc3f46a23c83a88]*/
/*[clinic end generated code: output=9797cd03c5204ddb input=3bc3f46a23c83a88]*/

/*[clinic input]
output push
Expand Down
14 changes: 7 additions & 7 deletions Modules/_io/clinic/bufferedio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Modules/_io/clinic/stringio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions Modules/_io/clinic/textio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,9 @@ class CLanguage(Language):
""")
GETTERDEF_PROTOTYPE_DEFINE: Final[str] = normalize_snippet(r"""
#if defined({getset_basename}_HAS_DOCSTR)
# define {getset_basename}_DOCSTR {getset_basename}__doc__
# define {getset_basename}_DOCSTR {getset_basename}__doc__
#else
# define {getset_basename}_DOCSTR NULL
# define {getset_basename}_DOCSTR NULL
#endif
#if defined({getset_name}_GETSETDEF)
# undef {getset_name}_GETSETDEF
Expand All @@ -896,9 +896,9 @@ class CLanguage(Language):
""")
SETTERDEF_PROTOTYPE_DEFINE: Final[str] = normalize_snippet(r"""
#if defined({getset_name}_HAS_DOCSTR)
# define {getset_basename}_DOCSTR {getset_basename}__doc__
# define {getset_basename}_DOCSTR {getset_basename}__doc__
#else
# define {getset_basename}_DOCSTR NULL
# define {getset_basename}_DOCSTR NULL
#endif
#if defined({getset_name}_GETSETDEF)
# undef {getset_name}_GETSETDEF
Expand Down
0