Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

Alternative wildcard #145

@gvanrossum

Description

@gvanrossum

Several SC members (at least 3) would prefer a different wildcard symbol than _, and their preferred symbol is ?.

Some of the reasons heard include:

  • Don't buy the argument that this is used in so many other languages
  • Prefer else: instead of case _: (or case ?: for that matter)
  • Apparently people use this commonly: _ = something(); print(_), which would make them believe that case _: print(_) would be valid
  • Confusion with other uses of _ like an alias for gettext or the last value printed by the REPL
  • (UPDATE:) It would be another "exception to the rules"/"special case"

Honestly, while I still prefer _, I could live with ? if that was needed to get the SC's approval.

UPDATE: In defense of copying from other languages: let's not unnecessarily invent where we can easily copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fully peppedIssues that have been fully documented in the PEPrejectedA rejected ideasc-feedbackIssues raised in the steering committee feedback

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions