Skip to content

Make guides/creating-command-line-tools.rst inclusive #1907

Closed

Description

@qredwoods

Issue Description

source/guides/
creating-command-line-tools.rst uses an example based on gender, written in a way potentially offensive to nonbinary people. It provides "masculine" and "feminine" as options. It then includes a line

pronoun = "her" if feminine else "his" if masculine or knight else "its"

greeting += f"what's-{pronoun}-name"

This is not nonbinary-inclusive, and specifically there's violent history of applying 'its' to trans people as a means of dehumanization. (Some individuals do use 'it/its' pronouns, but in code or conduct generally "else 'its' " should not be the logic. (they/them/their/theirs are better 'else' defaults in keeping with how people generally refer to someone if gender is unknown.)

This could be remedied by expanding the intial input commands to include nonbinary as an option, and to somehow modify the pronoun logic such as else 'their' though I wonder about just reworking or dropping gender from this example as for instructional purposes it could be any/many things other than gender. Alternatively it could be expanded it to include custom pronouns beyond her, his, their. Higher up in the code the cli takes commands -masculine and -feminine, it could be written to take -nonbinary and have 'Mx.' as the resulting output when a name is provided.

As is, the example may be a negative distraction for some learners, and as such is not in alignment with the PSF code of conduct section that states

"Every member of our community has the right to have their identity respected. The Python community is dedicated to providing a positive experience for everyone, regardless of [...] gender identity and expression [...] "

Code of Conduct

  • I am aware that participants in this repository must follow the PSF Code of Conduct.

Activity

  1. added a commit that references this issue on Sep 16, 2025
    c327427
  2. ncoghlan commented on Sep 16, 2025

    @ncoghlan
    Member

    I reworked the example in #1913 to just accept a "title" option directly.

    I left --knight as a gender-neutral "Sir", since it's there as an example of accepting flag options, and while the gender neutral form is far from universal (some places with knighthoods use "Dame" instead of "Sir" for female knights), it's common enough that I'm OK with keeping it.

  3. ncoghlan commented on Sep 16, 2025

    @ncoghlan
    Member

    On second thoughts, --doctor will serve that purpose just as well, and is more obviously gender neutral, so I'll change that over.

  4. added
    type: enhancementA self-contained enhancement or new feature
    type: taskSomething that needs to be done that is not a bug or feature
    on Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementA self-contained enhancement or new featuretype: taskSomething that needs to be done that is not a bug or feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions