Skip to content

Commit

Permalink
Fix IronLanguages#1191: str.format fails with kwarg named 'args'.
Browse files Browse the repository at this point in the history
Apply the \u00F8 hack to protect the paramter names during binding.
  • Loading branch information
jdhardy committed Apr 26, 2015
1 parent cd0dc92 commit 7beadc2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1334,12 +1334,12 @@ public static string zfill(this string self, int width) {
///
/// Conversion can be 'r' for repr or 's' for string.
/// </summary>
public static string/*!*/ format(CodeContext/*!*/ context, string format_string, [ParamDictionary]IDictionary<object, object> kwargs, params object[] args) {
public static string/*!*/ format(CodeContext/*!*/ context, string format_string\u00F8, [ParamDictionary]IDictionary<object, object> kwargs\u00F8, params object[] args\u00F8) {
return NewStringFormatter.FormatString(
PythonContext.GetContext(context),
format_string,
PythonTuple.MakeTuple(args),
kwargs
format_string\u00F8,
PythonTuple.MakeTuple(args\u00F8),
kwargs\u00F8
);
}

Expand Down

0 comments on commit 7beadc2

Please sign in to comment.