Skip to content
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

help(Scene.play) #1204

Open
wants to merge 1 commit into
base: master
from
Open

help(Scene.play) #1204

wants to merge 1 commit into from

Conversation

@parmentelat
Copy link

@parmentelat parmentelat commented Aug 16, 2020

  1. The motivation for making this change (or link the relevant issues)

trying to get help on Scene.play leads to a dead end, because the handle_play_like_call decorator fails to take care of its outcome's docstring (and other special attributes like __name__ I would bet)

the good practice for writing such decorator is to take advantage of functools.wraps, this PR exhibits one example; let me know what you think and I could review the code more deeply to account for the other possible places where that change could come in handy

this way, decorated methods - typically Scene.play - have a decent docstring
so first-time users can use help() on them

  1. How you tested the new behavior (e.g. a minimal working example, before/after
    screenshots, gifs, commands, etc.) This is rather informal at the moment, but
    the goal is to show us how you know the pull request works as intended.

well, I'm a first time user, and I've been using this brew of manim for my first steps, and have not met any unexpected result so far, as compared to what the tutorial shows

this way, decorated methods - typically Scene.play - have a decent docstring
so first-time users can use help()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.