Skip to content

Argument Clinic How-To needs more examples #1190

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

Open
littlebutt opened this issue Jul 16, 2023 · 2 comments
Open

Argument Clinic How-To needs more examples #1190

littlebutt opened this issue Jul 16, 2023 · 2 comments
Labels
enhancement guide-edits Editing of doc or content needed

Comments

@littlebutt
Copy link

littlebutt commented Jul 16, 2023

Documentation

Currently, the example for AC How-To is the method _pickle.Pickler.dump. I think it is not proper since it cannot cover all cases and makes readers confused. A more intuitive example should be considered to replace the current one.

Linked PRs

@erlend-aasland
Copy link
Contributor

I think it is not proper since it cannot cover all cases and makes readers confused. A more intuitive example should be considered to replace the current one.

Can you elaborate? Which cases are not covered, what is confusing, and what is a more intuitive example? :)

@littlebutt
Copy link
Author

I think it is not proper since it cannot cover all cases and makes readers confused. A more intuitive example should be considered to replace the current one.

Can you elaborate? Which cases are not covered, what is confusing, and what is a more intuitive example? :)

In the chapter Converting Your First Function, some steps don't have Sample. For example, in step 5, it says:

(Our example docstring consists solely of a summary line, so the sample code doesn’t have to change for this step.)

In step 9, it says:

(_pickle.Pickler.dump has neither, so our sample is unchanged.)

I picked another function _asyncio.Future.add_done_callback and it can cover these steps rightly. Actually, I refered this function when I was learning AC.

@erlend-aasland erlend-aasland transferred this issue from python/cpython Oct 12, 2023
@pradyunsg pradyunsg added guide-edits Editing of doc or content needed enhancement labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement guide-edits Editing of doc or content needed
Projects
None yet
Development

No branches or pull requests

4 participants
@pradyunsg @erlend-aasland @littlebutt and others