[docs] [issue37618] Docs: Code example locations in stdtypes

Kyle Stanley report at bugs.python.org
Thu Jul 18 03:42:29 EDT 2019


New submission from Kyle Stanley <aeros167 at 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 at python
components: Documentation
messages: 348104
nosy: aeros167, docs at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37618>
_______________________________________


More information about the docs mailing list