[Python-checkins] r68070 - sandbox/trunk/pep0/pep0/pep.py

benjamin.peterson python-checkins at python.org
Tue Dec 30 18:36:56 CET 2008


Author: benjamin.peterson
Date: Tue Dec 30 18:36:55 2008
New Revision: 68070
Log:
special case Just and display a nickname for PEP authorship
Modified:
 sandbox/trunk/pep0/pep0/pep.py
Modified: sandbox/trunk/pep0/pep0/pep.py
==============================================================================
--- sandbox/trunk/pep0/pep0/pep.py	(original)
+++ sandbox/trunk/pep0/pep0/pep.py	Tue Dec 30 18:36:55 2008
@@ -58,8 +58,8 @@
 self.email = email.lower()
 last_name_fragment, suffix = self._last_name(name)
 name_sep = name.index(last_name_fragment)
- self.first = name[:name_sep].strip()
- self.last = last_name_fragment 
+ self.first = name[:name_sep].rstrip()
+ self.last = last_name_fragment
 self.suffix = suffix
 if not self.first:
 self.last_first = self.last
@@ -67,9 +67,16 @@
 self.last_first = u', '.join([self.last, self.first])
 if self.suffix:
 self.last_first += u', ' + self.suffix
- if self.first == "Guido":
+ if self.last == "van Rossum":
 # Special case for our beloved BDFL. :)
- self.last = "GvR"
+ if self.first == "Guido":
+ self.nick = "GvR"
+ elif self.first == "Just":
+ self.nick = "JvR"
+ else:
+ raise ValueError("unkown van Rossum %r!" % self)
+ else:
+ self.nick = self.last
 
 def __hash__(self):
 return hash(self.first_last)
@@ -262,7 +269,7 @@
 @property
 def author_abbr(self):
 """Return the author list as a comma-separated with only last names."""
- return u', '.join(x.last for x in self.authors)
+ return u', '.join(x.nick for x in self.authors)
 
 @property
 def title_abbr(self):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /