8000 Fix PEP 0 name parsing by AA-Turner · Pull Request #1386 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

Fix PEP 0 name parsing #1386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move more special cases to exceptions file
  • Loading branch information
AA-Turner committed Jun 17, 2020
commit ee33701d55dfa199b28df27bf4279e09d80e4902
5 changes: 4 additions & 1 deletion AUTHORS.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Full Name, Surname First, Name Reference
Ernest W. Durbin III, "Durbin, Ernest W., III", Durbin
Inada Naoki, "Inada, Naoki", Inada
Inada Naoki, "Inada, Naoki", Inada
Guido van Rossum, "van Rossum, Guido (GvR)", GvR
Just van Rossum, "van Rossum, Just (JvR)", JvR
The Python core team and community, The Python core team and community, The Python core team and community
14 changes: 0 additions & 14 deletions pep0/pep.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ def set_name_parts(self):
if suffix:
self.last_first += f", {suffix}"

if self.last == "van Rossum":
# Special case for our beloved BDFL. :)
if self.first == "Guido":
self.nick = "GvR"
elif self.first == "Just":
self.nick = "JvR"
else:
raise ValueError(f"unknown van Rossum ({self.first_last})!")
self.last_first += f" ({self.nick})"

def __hash__(self):
return hash(self.first_last)

Expand Down Expand Up @@ -134,10 +124,6 @@ def _parse_name(full_name):

"""
possible_suffixes = ["Jr", "Jr.", "II", "III"]
special_cases = ["The Python core team and community"]

if full_name in special_cases:
return {"name": full_name}

suffix_partition = full_name.partition(",")
pre_suffix = suffix_partition[0].strip()
Expand Down
0