[Python-checkins] r54751 - sandbox/trunk/2to3/fixes/util.py
collin.winter
python-checkins at python.org
Wed Apr 11 17:27:07 CEST 2007
Author: collin.winter
Date: Wed Apr 11 17:27:03 2007
New Revision: 54751
Modified:
sandbox/trunk/2to3/fixes/util.py
Log:
Add a KeywordArg() macro.
Modified: sandbox/trunk/2to3/fixes/util.py
==============================================================================
--- sandbox/trunk/2to3/fixes/util.py (original)
+++ sandbox/trunk/2to3/fixes/util.py Wed Apr 11 17:27:03 2007
@@ -15,6 +15,10 @@
### Common node-construction "macros"
###########################################################
+def KeywordArg(keyword, value):
+ return Node(syms.argument,
+ [keyword, Leaf(token.EQUAL, '='), value])
+
def LParen():
return Leaf(token.LPAR, "(")
More information about the Python-checkins
mailing list