[Python-checkins] r68046 - in sandbox/trunk/pep0/pep0: output.py pep.py
benjamin.peterson
python-checkins at python.org
Tue Dec 30 00:17:34 CET 2008
Author: benjamin.peterson
Date: Tue Dec 30 00:17:34 2008
New Revision: 68046
Log:
rearrange imports
Modified:
sandbox/trunk/pep0/pep0/output.py
sandbox/trunk/pep0/pep0/pep.py
Modified: sandbox/trunk/pep0/pep0/output.py
==============================================================================
--- sandbox/trunk/pep0/pep0/output.py (original)
+++ sandbox/trunk/pep0/pep0/output.py Tue Dec 30 00:17:34 2008
@@ -1,10 +1,11 @@
"""Code to handle the output of PEP 0."""
-from . import constants
-from .pep import PEP
+import sys
+import unicodedata
from operator import attrgetter
-from sys import stdout
-from unicodedata import normalize
+
+from . import constants
+from .pep import PEP
indent = u' '
@@ -93,7 +94,7 @@
return authors_list
-def write_pep0(peps, output=stdout):
+def write_pep0(peps, output=sys.stdout):
print>>output, constants.header
print>>output
print>>output, u"Introduction"
@@ -160,7 +161,7 @@
print>>output
authors_dict = verify_email_addresses(peps)
max_name = max(authors_dict.keys(),
- key=lambda x: len(normalize('NFC', x.last_first)))
+ key=lambda x: len(unicodedata.normalize('NFC', x.last_first)))
max_name_len = len(max_name.last_first)
print>>output, u" %s %s" % ('name'.ljust(max_name_len), 'email address')
print>>output, u" %s %s" % ((len('name')*'-').ljust(max_name_len),
Modified: sandbox/trunk/pep0/pep0/pep.py
==============================================================================
--- sandbox/trunk/pep0/pep0/pep.py (original)
+++ sandbox/trunk/pep0/pep0/pep.py Tue Dec 30 00:17:34 2008
@@ -1,10 +1,11 @@
"""Code for handling object representation of a PEP."""
-from . import constants
-
-from email.parser import HeaderParser
import re
import textwrap
+from email.parser import HeaderParser
+
+from . import constants
+
class Author(object):
More information about the Python-checkins
mailing list