(source, filename='<unknown>', mode='exec', *,
          type_comments=False, feature_version=None)
return compile(source, filename, mode, flags,
                   _feature_version=feature_version)
Parse the source into an AST node.
    Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
    Pass type_comments=True to get back type comments where the syntax allows.
Parse the source into an AST node.
    Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
    Pass type_comments=True to get back type comments where the syntax allows.
Parse the source into an AST node . Equivalent to compile ( source filename mode PyCF_ONLY_AST ) . Pass type_comments = True to get back type comments where the syntax allows .
def parse(source, filename='<unknown>', mode='exec', *,
          type_comments=False, feature_version=None):
    """
    Parse the source into an AST node.
    Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
    Pass type_comments=True to get back type comments where the syntax allows.
    """
    flags = PyCF_ONLY_AST
    if type_comments:
        flags |= PyCF_TYPE_COMMENTS
    if isinstance(feature_version, tuple):
        major, minor = feature_version  # Should be a 2-tuple.
        assert major == 3
        feature_version = minor
    elif feature_version is None:
        feature_version = -1
    # Else it should be an int giving the minor version for 3.x.
    return compile(source, filename, mode, flags,
                   _feature_version=feature_version)
def parse ( source , filename = '<unknown>' , mode = 'exec' , * , type_comments = False , feature_version = None ) : flags = PyCF_ONLY_AST if type_comments : flags |= PyCF_TYPE_COMMENTS if isinstance ( feature_version , tuple ) : major , minor = feature_version # Should be a 2-tuple. assert major == 3 feature_version = minor elif feature_version is None : feature_version = - 1 # Else it should be an int giving the minor version for 3.x. return compile ( source , filename , mode , flags , _feature_version = feature_version )