Package org.python.pydev.parser.jython.ast

Examples of org.python.pydev.parser.jython.ast.Tuple


    public void testUnpacking() {
        String s = "a, *b, c = range(5)";

        Module ast = (Module) parseLegalDocStr(s);
        Assign assign = (Assign) ast.body[0];
        Tuple tup = (Tuple) assign.targets[0];
        Starred starred = (Starred) tup.elts[1];
        Name name = (Name) starred.value;
        assertEquals("b", name.id);
        assertEquals(Name.Store, name.ctx);
        parseLegalDocStrWithoutTree(s);
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.ast.Tuple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.