Opened 5 years ago

Closed 5 years ago

#20633 closed enhancement (fixed)

Get rid of "__doc__ =" instead of docstring

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.3
Component: documentation Keywords:
Cc: nthiery, hivert, chapoton Merged in:
Authors: Jeroen Demeyer Reviewers: Nicolas M. Thiéry
Report Upstream: N/A Work issues:
Branch: fae960a (Commits, GitHub, GitLab) Commit: fae960af0cf38345496a9544c0de56f2b0421b57
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

Some Sage modules look like

__doc__ = r"""
docstring here...
"""

Most of these were introduced in #16256. I see no reason at all to have this instead of a normal docstring.

Change History (10)

comment:1 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/20633

comment:2 Changed 5 years ago by jdemeyer

  • Commit set to 6abaaf9a88fc4df68053fb1ef12708a833e2d285
  • Status changed from new to needs_review

New commits:

6abaaf9Use normal docstring instead of assigning __doc__

comment:3 Changed 5 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 5 years ago by jdemeyer

  • Dependencies set to #20617
  • Status changed from needs_review to needs_work

comment:5 Changed 5 years ago by git

  • Commit changed from 6abaaf9a88fc4df68053fb1ef12708a833e2d285 to fae960af0cf38345496a9544c0de56f2b0421b57

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

fae960aUse normal docstring instead of assigning __doc__

comment:6 Changed 5 years ago by jdemeyer

  • Dependencies #20617 deleted
  • Status changed from needs_work to needs_review

comment:7 Changed 5 years ago by nthiery

Hi Jeroen,

Thanks for catching this. I remember trying out several things before converging to this solution, but can't recall why I had used and explicit __doc__ assignment. I may have just confused myself at some point. If everything works without the explicit assignment, and I don't see why not, that's certainly much better. I have double checked for introspection and doc building. So positive review!


New commits:

fae960aUse normal docstring instead of assigning __doc__

comment:8 Changed 5 years ago by nthiery

  • Status changed from needs_review to positive_review

comment:9 Changed 5 years ago by jdemeyer

  • Reviewers set to Nicolas M. Thiéry

Thanks!

It could be that something did not work with some earlier version...

comment:10 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/20633 to fae960af0cf38345496a9544c0de56f2b0421b57
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.