FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[docs] gh-101273: Expand enum documentation on limitations by samypr100 · Pull Request #101274 · python/cpython · GitHub

/ cpython Public

[docs] gh-101273: Expand enum documentation on limitations - #101274

Closed
samypr100 wants to merge 1 commit into
python:mainfrom
samypr100:enum-docs-update
Closed

[docs] gh-101273: Expand enum documentation on limitations#101274
samypr100 wants to merge 1 commit into
python:mainfrom
samypr100:enum-docs-update

Conversation

samypr100 commented Jan 23, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

bedevere-bot added the docs Documentation in the Doc dir label Jan 23, 2023

ethanfurman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure this needs to be in the docs; I am sure that this is not the right section for them to be in. I'll try to review the enum docs this week to see if there is a better spot for this warning.

Copy link
Copy Markdown
Contributor Author

@ethanfurman To expand a little on the motivation, the codebase that I originally encountered this had something close to

class ElementType(StrEnum):
    title = "..."
    comment = "..."
    author = "..."
    # ...

It didn't occur to me at first that the errors I was seeing in mypy (mypy was being added after the fact) were due to StrEnum inheriting from str, hence why I also thought that it might be a good idea to add a warning/note to the docs.

Comment thread Doc/library/enum.rst Outdated
Comment thread Doc/library/enum.rst Outdated
Comment thread Doc/library/enum.rst

Copy link
Copy Markdown
Member

Closing in favor of #103596. Thank you, @samypr100 for the encouragement to properly fix this behavior.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand on enum limitations

4 participants


Back | FazBrowse Home | New Git URL