Skip to content

Conversation

@ooooo-create
Copy link

@ooooo-create ooooo-create commented Sep 6, 2025

Fix some typos
Instalation -> Installation
strack -> stack
Greather -> Greater
Representes -> Represents
braket -> bracket

In my try, f-string formatting behavior of  str-based  Enum  members differs across Python versions

from enum import Enum
class MyEnum(str, Enum):
    IntOpt = "Integer?"

print(f"{MyEnum.IntOpt}")

In 3.10, it will be Integer? and in 3.11, 3.12, 3.13, it will be MyEnum.IntOpt
So I explicitly customize a __str__ function with {enum_name}.{member_name}

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant