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

Example snippets for simpler functions/methods #81738

Closed
kishvanchee mannequin opened this issue Jul 11, 2019 · 2 comments
Closed

Example snippets for simpler functions/methods #81738

kishvanchee mannequin opened this issue Jul 11, 2019 · 2 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@kishvanchee
Copy link
Mannequin

kishvanchee mannequin commented Jul 11, 2019

BPO 37557
Nosy @rhettinger, @kishvanchee

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2019-07-13.06:03:42.632>
created_at = <Date 2019-07-11.06:49:39.207>
labels = ['type-feature', 'docs']
title = 'Example snippets for simpler functions/methods'
updated_at = <Date 2019-07-13.06:03:42.618>
user = 'https://github.com/kishvanchee'

bugs.python.org fields:

activity = <Date 2019-07-13.06:03:42.618>
actor = 'rhettinger'
assignee = 'docs@python'
closed = True
closed_date = <Date 2019-07-13.06:03:42.632>
closer = 'rhettinger'
components = ['Documentation']
creation = <Date 2019-07-11.06:49:39.207>
creator = 'kishvanchee'
dependencies = []
files = []
hgrepos = []
issue_num = 37557
keywords = []
message_count = 2.0
messages = ['347656', '347776']
nosy_count = 3.0
nosy_names = ['rhettinger', 'docs@python', 'kishvanchee']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue37557'
versions = []

@kishvanchee
Copy link
Mannequin Author

kishvanchee mannequin commented Jul 11, 2019

Is there a reason why many (not all) of the simpler methods lack example snippets?

Snippets which are present:

  1. https://docs.python.org/3/library/stdtypes.html#str.rstrip
  2. https://docs.python.org/3/library/stdtypes.html#str.strip

Snippets which are not present:

  1. https://docs.python.org/3/library/stdtypes.html#str.lower
  2. https://docs.python.org/3/library/stdtypes.html#str.upper
  3. https://docs.python.org/3/library/stdtypes.html#str.isupper

Is there any recommendation against adding concise example snippets for all methods?

I am of the opinion that short examples are more easier to read and visually skim through, than reading the description. I was hoping I could add example snippets to the simpler methods if anyone does not have any objection towards it.

@kishvanchee kishvanchee mannequin assigned docspython Jul 11, 2019
@kishvanchee kishvanchee mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jul 11, 2019
@rhettinger
Copy link
Contributor

We generally only put the examples where they add something substantive. Otherwise, it just make the docs verbose and time consuming to read start to finish.

Adding an example for str.lower() contributes no additional value. Most published Python books would all avoid the unnecessary here as well. FWIW, we have no evidence that any user has ever found the current form hard to use.

So, let's close this. If you're looking for places to contribute, please look at the open bugs where there are known problems.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant