[Python-checkins] r79325 - in python/trunk/Lib/lib2to3: fixes/fix_exitfunc.py

benjamin.peterson python-checkins at python.org
Tue Mar 23 04:03:55 CET 2010


Author: benjamin.peterson
Date: Tue Mar 23 04:03:55 2010
New Revision: 79325
Log:
Merged revisions 79313,79324 via svnmerge from 
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
 r79313 | benjamin.peterson | 2010年03月22日 17:59:57 -0500 (2010年3月22日) | 1 line
 
 another case where a symbol is needed
........
 r79324 | benjamin.peterson | 2010年03月22日 21:59:47 -0500 (2010年3月22日) | 1 line
 
 use unicode literals
........
Modified:
 python/trunk/Lib/lib2to3/ (props changed)
 python/trunk/Lib/lib2to3/fixes/fix_exitfunc.py
Modified: python/trunk/Lib/lib2to3/fixes/fix_exitfunc.py
==============================================================================
--- python/trunk/Lib/lib2to3/fixes/fix_exitfunc.py	(original)
+++ python/trunk/Lib/lib2to3/fixes/fix_exitfunc.py	Tue Mar 23 04:03:55 2010
@@ -40,9 +40,9 @@
 return
 
 func = results["func"].clone()
- func.prefix = ""
+ func.prefix = u""
 register = pytree.Node(syms.power,
- Attr(Name("atexit"), Name("register"))
+ Attr(Name(u"atexit"), Name(u"register"))
 )
 call = Call(register, [func], node.prefix)
 node.replace(call)
@@ -57,14 +57,14 @@
 names = self.sys_import.children[1]
 if names.type == syms.dotted_as_names:
 names.append_child(Comma())
- names.append_child(Name("atexit", " "))
+ names.append_child(Name(u"atexit", u" "))
 else:
 containing_stmt = self.sys_import.parent
 position = containing_stmt.children.index(self.sys_import)
 stmt_container = containing_stmt.parent
 new_import = pytree.Node(syms.import_name,
- [Name("import"), Name("atexit", " ")]
+ [Name(u"import"), Name(u"atexit", u" ")]
 )
- new = pytree.Node("simple_stmt", [new_import])
+ new = pytree.Node(syms.simple_stmt, [new_import])
 containing_stmt.insert_child(position + 1, Newline())
 containing_stmt.insert_child(position + 2, new)


More information about the Python-checkins mailing list

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