Skip to content

[Basics, Conditionals, and List Methods]: Corrected Typos, Formatting, & Grammar Issues#4179

Merged
BethanyG merged 4 commits into
exercism:mainfrom
BethanyG:fix-typos-basics-conditionals-listmethods
May 15, 2026
Merged

[Basics, Conditionals, and List Methods]: Corrected Typos, Formatting, & Grammar Issues#4179
BethanyG merged 4 commits into
exercism:mainfrom
BethanyG:fix-typos-basics-conditionals-listmethods

Conversation

@BethanyG
Copy link
Copy Markdown
Member

Please see Issue 4165 for more details.

Comment thread concepts/basics/about.md
Comment thread concepts/basics/about.md
Otherwise, returns the result of object.__str__() (if defined)
or repr(object).
encoding defaults to sys.getdefaultencoding().
encoding defaults to 'utf-8'.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this statement just incorrect before? I think sys.getdefaultencoding() doesn't always return "utf-8".

Copy link
Copy Markdown
Member Author

@BethanyG BethanyG May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this example is copied directly from the terminal after running print(str.__doc__), I am assuming that it changed between Python versions. Not positive, but I think that this bit was last touched on Exercism prior to Python 3.11.5, but I can't find it in the history. You might be able to find the .__doc__ change for str in the Python language repo or docs (careful! these default to Python 3.14, so you need to search by Python version) somewhere, but you'd have to dig by Python version. It is the Python docsring for the str class/type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh... "utf-8" seems to have been the default as far back as Python 3.2, and the docs don't seem to specify the default before then. I wonder where the sys.getdefaultencoding() came from.

Copy link
Copy Markdown
Member Author

@BethanyG BethanyG May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno. It might have been me or someone else running (unknowingly) a Python 2.7 version in an env. It's fixed now, tho. 🤷🏽‍♀️ These are the sorts of things that make me crazy when we upgrade the Python versions. 🙂 It's never "as simple as installing a new Python". 😉

Comment thread concepts/conditionals/about.md Outdated
Comment thread concepts/conditionals/about.md
Comment thread concepts/conditionals/about.md Outdated
Comment thread concepts/conditionals/introduction.md Outdated
@BethanyG BethanyG requested a review from Yrahcaz7 May 15, 2026 19:44
Comment thread concepts/basics/about.md Outdated
Comment thread concepts/conditionals/about.md Outdated
Comment thread concepts/conditionals/about.md Outdated
@BethanyG BethanyG requested a review from Yrahcaz7 May 15, 2026 20:34
@BethanyG BethanyG merged commit b6ea39b into exercism:main May 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants