From 1e1eca4b7e5bfce0e3ccb4d751eca48d359799e1 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Wed, 14 Dec 2011 12:26:40 +0400 Subject: [PATCH] fixed tuple assignment with numeric literal --- python/src/com/jetbrains/python/psi/PyUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/src/com/jetbrains/python/psi/PyUtil.java b/python/src/com/jetbrains/python/psi/PyUtil.java index 40c40cd5dcc0..fd6870d6db19 100644 --- a/python/src/com/jetbrains/python/psi/PyUtil.java +++ b/python/src/com/jetbrains/python/psi/PyUtil.java @@ -1095,6 +1095,8 @@ public class PyUtil { valuesLength = ((PyDictLiteralExpression)expression).getElements().length; else if (expression instanceof PyStringLiteralExpression) valuesLength = ((PyStringLiteralExpression)expression).getStringValue().length(); + else if (expression instanceof PyNumericLiteralExpression) + valuesLength = 1; else if (expression instanceof PyCallExpression) { PyCallExpression call = (PyCallExpression)expression; if (call.isCalleeText("dict"))