New submission from Kyle Stanley <aeros...@gmail.com>:

In the docs for the module stdtypes, the code example for several commonly used 
functions are in the bytearray section instead of the str section, where new 
users are far more likely to look. The new users are much more likely to 
benefit from seeing examples of these functions. A few examples of this 
include: islower(), isupper(), and istitle(). Since the functionality is very 
similar for functions such as str.islower() and bytearray.islower(), it doesn't 
seem necessary to include separate examples for each. With that in mind, here's 
a couple of potential solutions:

1) Move the location of the code examples to the str equivalent. This would 
require only removing the 'b' notation proceeding the strings. A link to the 
str equivalent could be potentially provided.

2) Provide a reference link to equivalent bytearray function in the str 
function's summary. This would be a bit easier since the code examples would 
not have to me modified or moved. However, for reasons stated above, it seems 
to make a bit more sense to have the examples be in the str functions rather 
than in the bytearray functions.

I can start working on a PR to address this, but I'll wait on some feedback 
first.

----------
assignee: docs@python
components: Documentation
messages: 348104
nosy: aeros167, docs@python
priority: normal
severity: normal
status: open
title: Docs: Code example locations in stdtypes
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37618>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to