Commit b78b1b98 authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

Small improvement to django.template.resolve_variable -- isdigit() instead of 0123456789

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 3db34ce7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -614,7 +614,7 @@ def resolve_variable(path, context):

    (The example assumes VARIABLE_ATTRIBUTE_SEPARATOR is '.')
    """
    if path[0] in '0123456789':
    if path[0].isdigit():
        number_type = '.' in path and float or int
        try:
            current = number_type(path)