Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2..../compiler
File: ast.py
"""Python abstract syntax node definitions
[0] Fix | Delete
[1] Fix | Delete
This file is automatically generated by Tools/compiler/astgen.py
[2] Fix | Delete
"""
[3] Fix | Delete
from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
[4] Fix | Delete
[5] Fix | Delete
def flatten(seq):
[6] Fix | Delete
l = []
[7] Fix | Delete
for elt in seq:
[8] Fix | Delete
t = type(elt)
[9] Fix | Delete
if t is tuple or t is list:
[10] Fix | Delete
for elt2 in flatten(elt):
[11] Fix | Delete
l.append(elt2)
[12] Fix | Delete
else:
[13] Fix | Delete
l.append(elt)
[14] Fix | Delete
return l
[15] Fix | Delete
[16] Fix | Delete
def flatten_nodes(seq):
[17] Fix | Delete
return [n for n in flatten(seq) if isinstance(n, Node)]
[18] Fix | Delete
[19] Fix | Delete
nodes = {}
[20] Fix | Delete
[21] Fix | Delete
class Node:
[22] Fix | Delete
"""Abstract base class for ast nodes."""
[23] Fix | Delete
def getChildren(self):
[24] Fix | Delete
pass # implemented by subclasses
[25] Fix | Delete
def __iter__(self):
[26] Fix | Delete
for n in self.getChildren():
[27] Fix | Delete
yield n
[28] Fix | Delete
def asList(self): # for backwards compatibility
[29] Fix | Delete
return self.getChildren()
[30] Fix | Delete
def getChildNodes(self):
[31] Fix | Delete
pass # implemented by subclasses
[32] Fix | Delete
[33] Fix | Delete
class EmptyNode(Node):
[34] Fix | Delete
pass
[35] Fix | Delete
[36] Fix | Delete
class Expression(Node):
[37] Fix | Delete
# Expression is an artificial node class to support "eval"
[38] Fix | Delete
nodes["expression"] = "Expression"
[39] Fix | Delete
def __init__(self, node):
[40] Fix | Delete
self.node = node
[41] Fix | Delete
[42] Fix | Delete
def getChildren(self):
[43] Fix | Delete
return self.node,
[44] Fix | Delete
[45] Fix | Delete
def getChildNodes(self):
[46] Fix | Delete
return self.node,
[47] Fix | Delete
[48] Fix | Delete
def __repr__(self):
[49] Fix | Delete
return "Expression(%s)" % (repr(self.node))
[50] Fix | Delete
[51] Fix | Delete
class Add(Node):
[52] Fix | Delete
def __init__(self, leftright, lineno=None):
[53] Fix | Delete
self.left = leftright[0]
[54] Fix | Delete
self.right = leftright[1]
[55] Fix | Delete
self.lineno = lineno
[56] Fix | Delete
[57] Fix | Delete
def getChildren(self):
[58] Fix | Delete
return self.left, self.right
[59] Fix | Delete
[60] Fix | Delete
def getChildNodes(self):
[61] Fix | Delete
return self.left, self.right
[62] Fix | Delete
[63] Fix | Delete
def __repr__(self):
[64] Fix | Delete
return "Add((%s, %s))" % (repr(self.left), repr(self.right))
[65] Fix | Delete
[66] Fix | Delete
class And(Node):
[67] Fix | Delete
def __init__(self, nodes, lineno=None):
[68] Fix | Delete
self.nodes = nodes
[69] Fix | Delete
self.lineno = lineno
[70] Fix | Delete
[71] Fix | Delete
def getChildren(self):
[72] Fix | Delete
return tuple(flatten(self.nodes))
[73] Fix | Delete
[74] Fix | Delete
def getChildNodes(self):
[75] Fix | Delete
nodelist = []
[76] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[77] Fix | Delete
return tuple(nodelist)
[78] Fix | Delete
[79] Fix | Delete
def __repr__(self):
[80] Fix | Delete
return "And(%s)" % (repr(self.nodes),)
[81] Fix | Delete
[82] Fix | Delete
class AssAttr(Node):
[83] Fix | Delete
def __init__(self, expr, attrname, flags, lineno=None):
[84] Fix | Delete
self.expr = expr
[85] Fix | Delete
self.attrname = attrname
[86] Fix | Delete
self.flags = flags
[87] Fix | Delete
self.lineno = lineno
[88] Fix | Delete
[89] Fix | Delete
def getChildren(self):
[90] Fix | Delete
return self.expr, self.attrname, self.flags
[91] Fix | Delete
[92] Fix | Delete
def getChildNodes(self):
[93] Fix | Delete
return self.expr,
[94] Fix | Delete
[95] Fix | Delete
def __repr__(self):
[96] Fix | Delete
return "AssAttr(%s, %s, %s)" % (repr(self.expr), repr(self.attrname), repr(self.flags))
[97] Fix | Delete
[98] Fix | Delete
class AssList(Node):
[99] Fix | Delete
def __init__(self, nodes, lineno=None):
[100] Fix | Delete
self.nodes = nodes
[101] Fix | Delete
self.lineno = lineno
[102] Fix | Delete
[103] Fix | Delete
def getChildren(self):
[104] Fix | Delete
return tuple(flatten(self.nodes))
[105] Fix | Delete
[106] Fix | Delete
def getChildNodes(self):
[107] Fix | Delete
nodelist = []
[108] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[109] Fix | Delete
return tuple(nodelist)
[110] Fix | Delete
[111] Fix | Delete
def __repr__(self):
[112] Fix | Delete
return "AssList(%s)" % (repr(self.nodes),)
[113] Fix | Delete
[114] Fix | Delete
class AssName(Node):
[115] Fix | Delete
def __init__(self, name, flags, lineno=None):
[116] Fix | Delete
self.name = name
[117] Fix | Delete
self.flags = flags
[118] Fix | Delete
self.lineno = lineno
[119] Fix | Delete
[120] Fix | Delete
def getChildren(self):
[121] Fix | Delete
return self.name, self.flags
[122] Fix | Delete
[123] Fix | Delete
def getChildNodes(self):
[124] Fix | Delete
return ()
[125] Fix | Delete
[126] Fix | Delete
def __repr__(self):
[127] Fix | Delete
return "AssName(%s, %s)" % (repr(self.name), repr(self.flags))
[128] Fix | Delete
[129] Fix | Delete
class AssTuple(Node):
[130] Fix | Delete
def __init__(self, nodes, lineno=None):
[131] Fix | Delete
self.nodes = nodes
[132] Fix | Delete
self.lineno = lineno
[133] Fix | Delete
[134] Fix | Delete
def getChildren(self):
[135] Fix | Delete
return tuple(flatten(self.nodes))
[136] Fix | Delete
[137] Fix | Delete
def getChildNodes(self):
[138] Fix | Delete
nodelist = []
[139] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[140] Fix | Delete
return tuple(nodelist)
[141] Fix | Delete
[142] Fix | Delete
def __repr__(self):
[143] Fix | Delete
return "AssTuple(%s)" % (repr(self.nodes),)
[144] Fix | Delete
[145] Fix | Delete
class Assert(Node):
[146] Fix | Delete
def __init__(self, test, fail, lineno=None):
[147] Fix | Delete
self.test = test
[148] Fix | Delete
self.fail = fail
[149] Fix | Delete
self.lineno = lineno
[150] Fix | Delete
[151] Fix | Delete
def getChildren(self):
[152] Fix | Delete
children = []
[153] Fix | Delete
children.append(self.test)
[154] Fix | Delete
children.append(self.fail)
[155] Fix | Delete
return tuple(children)
[156] Fix | Delete
[157] Fix | Delete
def getChildNodes(self):
[158] Fix | Delete
nodelist = []
[159] Fix | Delete
nodelist.append(self.test)
[160] Fix | Delete
if self.fail is not None:
[161] Fix | Delete
nodelist.append(self.fail)
[162] Fix | Delete
return tuple(nodelist)
[163] Fix | Delete
[164] Fix | Delete
def __repr__(self):
[165] Fix | Delete
return "Assert(%s, %s)" % (repr(self.test), repr(self.fail))
[166] Fix | Delete
[167] Fix | Delete
class Assign(Node):
[168] Fix | Delete
def __init__(self, nodes, expr, lineno=None):
[169] Fix | Delete
self.nodes = nodes
[170] Fix | Delete
self.expr = expr
[171] Fix | Delete
self.lineno = lineno
[172] Fix | Delete
[173] Fix | Delete
def getChildren(self):
[174] Fix | Delete
children = []
[175] Fix | Delete
children.extend(flatten(self.nodes))
[176] Fix | Delete
children.append(self.expr)
[177] Fix | Delete
return tuple(children)
[178] Fix | Delete
[179] Fix | Delete
def getChildNodes(self):
[180] Fix | Delete
nodelist = []
[181] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[182] Fix | Delete
nodelist.append(self.expr)
[183] Fix | Delete
return tuple(nodelist)
[184] Fix | Delete
[185] Fix | Delete
def __repr__(self):
[186] Fix | Delete
return "Assign(%s, %s)" % (repr(self.nodes), repr(self.expr))
[187] Fix | Delete
[188] Fix | Delete
class AugAssign(Node):
[189] Fix | Delete
def __init__(self, node, op, expr, lineno=None):
[190] Fix | Delete
self.node = node
[191] Fix | Delete
self.op = op
[192] Fix | Delete
self.expr = expr
[193] Fix | Delete
self.lineno = lineno
[194] Fix | Delete
[195] Fix | Delete
def getChildren(self):
[196] Fix | Delete
return self.node, self.op, self.expr
[197] Fix | Delete
[198] Fix | Delete
def getChildNodes(self):
[199] Fix | Delete
return self.node, self.expr
[200] Fix | Delete
[201] Fix | Delete
def __repr__(self):
[202] Fix | Delete
return "AugAssign(%s, %s, %s)" % (repr(self.node), repr(self.op), repr(self.expr))
[203] Fix | Delete
[204] Fix | Delete
class Backquote(Node):
[205] Fix | Delete
def __init__(self, expr, lineno=None):
[206] Fix | Delete
self.expr = expr
[207] Fix | Delete
self.lineno = lineno
[208] Fix | Delete
[209] Fix | Delete
def getChildren(self):
[210] Fix | Delete
return self.expr,
[211] Fix | Delete
[212] Fix | Delete
def getChildNodes(self):
[213] Fix | Delete
return self.expr,
[214] Fix | Delete
[215] Fix | Delete
def __repr__(self):
[216] Fix | Delete
return "Backquote(%s)" % (repr(self.expr),)
[217] Fix | Delete
[218] Fix | Delete
class Bitand(Node):
[219] Fix | Delete
def __init__(self, nodes, lineno=None):
[220] Fix | Delete
self.nodes = nodes
[221] Fix | Delete
self.lineno = lineno
[222] Fix | Delete
[223] Fix | Delete
def getChildren(self):
[224] Fix | Delete
return tuple(flatten(self.nodes))
[225] Fix | Delete
[226] Fix | Delete
def getChildNodes(self):
[227] Fix | Delete
nodelist = []
[228] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[229] Fix | Delete
return tuple(nodelist)
[230] Fix | Delete
[231] Fix | Delete
def __repr__(self):
[232] Fix | Delete
return "Bitand(%s)" % (repr(self.nodes),)
[233] Fix | Delete
[234] Fix | Delete
class Bitor(Node):
[235] Fix | Delete
def __init__(self, nodes, lineno=None):
[236] Fix | Delete
self.nodes = nodes
[237] Fix | Delete
self.lineno = lineno
[238] Fix | Delete
[239] Fix | Delete
def getChildren(self):
[240] Fix | Delete
return tuple(flatten(self.nodes))
[241] Fix | Delete
[242] Fix | Delete
def getChildNodes(self):
[243] Fix | Delete
nodelist = []
[244] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[245] Fix | Delete
return tuple(nodelist)
[246] Fix | Delete
[247] Fix | Delete
def __repr__(self):
[248] Fix | Delete
return "Bitor(%s)" % (repr(self.nodes),)
[249] Fix | Delete
[250] Fix | Delete
class Bitxor(Node):
[251] Fix | Delete
def __init__(self, nodes, lineno=None):
[252] Fix | Delete
self.nodes = nodes
[253] Fix | Delete
self.lineno = lineno
[254] Fix | Delete
[255] Fix | Delete
def getChildren(self):
[256] Fix | Delete
return tuple(flatten(self.nodes))
[257] Fix | Delete
[258] Fix | Delete
def getChildNodes(self):
[259] Fix | Delete
nodelist = []
[260] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[261] Fix | Delete
return tuple(nodelist)
[262] Fix | Delete
[263] Fix | Delete
def __repr__(self):
[264] Fix | Delete
return "Bitxor(%s)" % (repr(self.nodes),)
[265] Fix | Delete
[266] Fix | Delete
class Break(Node):
[267] Fix | Delete
def __init__(self, lineno=None):
[268] Fix | Delete
self.lineno = lineno
[269] Fix | Delete
[270] Fix | Delete
def getChildren(self):
[271] Fix | Delete
return ()
[272] Fix | Delete
[273] Fix | Delete
def getChildNodes(self):
[274] Fix | Delete
return ()
[275] Fix | Delete
[276] Fix | Delete
def __repr__(self):
[277] Fix | Delete
return "Break()"
[278] Fix | Delete
[279] Fix | Delete
class CallFunc(Node):
[280] Fix | Delete
def __init__(self, node, args, star_args = None, dstar_args = None, lineno=None):
[281] Fix | Delete
self.node = node
[282] Fix | Delete
self.args = args
[283] Fix | Delete
self.star_args = star_args
[284] Fix | Delete
self.dstar_args = dstar_args
[285] Fix | Delete
self.lineno = lineno
[286] Fix | Delete
[287] Fix | Delete
def getChildren(self):
[288] Fix | Delete
children = []
[289] Fix | Delete
children.append(self.node)
[290] Fix | Delete
children.extend(flatten(self.args))
[291] Fix | Delete
children.append(self.star_args)
[292] Fix | Delete
children.append(self.dstar_args)
[293] Fix | Delete
return tuple(children)
[294] Fix | Delete
[295] Fix | Delete
def getChildNodes(self):
[296] Fix | Delete
nodelist = []
[297] Fix | Delete
nodelist.append(self.node)
[298] Fix | Delete
nodelist.extend(flatten_nodes(self.args))
[299] Fix | Delete
if self.star_args is not None:
[300] Fix | Delete
nodelist.append(self.star_args)
[301] Fix | Delete
if self.dstar_args is not None:
[302] Fix | Delete
nodelist.append(self.dstar_args)
[303] Fix | Delete
return tuple(nodelist)
[304] Fix | Delete
[305] Fix | Delete
def __repr__(self):
[306] Fix | Delete
return "CallFunc(%s, %s, %s, %s)" % (repr(self.node), repr(self.args), repr(self.star_args), repr(self.dstar_args))
[307] Fix | Delete
[308] Fix | Delete
class Class(Node):
[309] Fix | Delete
def __init__(self, name, bases, doc, code, decorators = None, lineno=None):
[310] Fix | Delete
self.name = name
[311] Fix | Delete
self.bases = bases
[312] Fix | Delete
self.doc = doc
[313] Fix | Delete
self.code = code
[314] Fix | Delete
self.decorators = decorators
[315] Fix | Delete
self.lineno = lineno
[316] Fix | Delete
[317] Fix | Delete
def getChildren(self):
[318] Fix | Delete
children = []
[319] Fix | Delete
children.append(self.name)
[320] Fix | Delete
children.extend(flatten(self.bases))
[321] Fix | Delete
children.append(self.doc)
[322] Fix | Delete
children.append(self.code)
[323] Fix | Delete
children.append(self.decorators)
[324] Fix | Delete
return tuple(children)
[325] Fix | Delete
[326] Fix | Delete
def getChildNodes(self):
[327] Fix | Delete
nodelist = []
[328] Fix | Delete
nodelist.extend(flatten_nodes(self.bases))
[329] Fix | Delete
nodelist.append(self.code)
[330] Fix | Delete
if self.decorators is not None:
[331] Fix | Delete
nodelist.append(self.decorators)
[332] Fix | Delete
return tuple(nodelist)
[333] Fix | Delete
[334] Fix | Delete
def __repr__(self):
[335] Fix | Delete
return "Class(%s, %s, %s, %s, %s)" % (repr(self.name), repr(self.bases), repr(self.doc), repr(self.code), repr(self.decorators))
[336] Fix | Delete
[337] Fix | Delete
class Compare(Node):
[338] Fix | Delete
def __init__(self, expr, ops, lineno=None):
[339] Fix | Delete
self.expr = expr
[340] Fix | Delete
self.ops = ops
[341] Fix | Delete
self.lineno = lineno
[342] Fix | Delete
[343] Fix | Delete
def getChildren(self):
[344] Fix | Delete
children = []
[345] Fix | Delete
children.append(self.expr)
[346] Fix | Delete
children.extend(flatten(self.ops))
[347] Fix | Delete
return tuple(children)
[348] Fix | Delete
[349] Fix | Delete
def getChildNodes(self):
[350] Fix | Delete
nodelist = []
[351] Fix | Delete
nodelist.append(self.expr)
[352] Fix | Delete
nodelist.extend(flatten_nodes(self.ops))
[353] Fix | Delete
return tuple(nodelist)
[354] Fix | Delete
[355] Fix | Delete
def __repr__(self):
[356] Fix | Delete
return "Compare(%s, %s)" % (repr(self.expr), repr(self.ops))
[357] Fix | Delete
[358] Fix | Delete
class Const(Node):
[359] Fix | Delete
def __init__(self, value, lineno=None):
[360] Fix | Delete
self.value = value
[361] Fix | Delete
self.lineno = lineno
[362] Fix | Delete
[363] Fix | Delete
def getChildren(self):
[364] Fix | Delete
return self.value,
[365] Fix | Delete
[366] Fix | Delete
def getChildNodes(self):
[367] Fix | Delete
return ()
[368] Fix | Delete
[369] Fix | Delete
def __repr__(self):
[370] Fix | Delete
return "Const(%s)" % (repr(self.value),)
[371] Fix | Delete
[372] Fix | Delete
class Continue(Node):
[373] Fix | Delete
def __init__(self, lineno=None):
[374] Fix | Delete
self.lineno = lineno
[375] Fix | Delete
[376] Fix | Delete
def getChildren(self):
[377] Fix | Delete
return ()
[378] Fix | Delete
[379] Fix | Delete
def getChildNodes(self):
[380] Fix | Delete
return ()
[381] Fix | Delete
[382] Fix | Delete
def __repr__(self):
[383] Fix | Delete
return "Continue()"
[384] Fix | Delete
[385] Fix | Delete
class Decorators(Node):
[386] Fix | Delete
def __init__(self, nodes, lineno=None):
[387] Fix | Delete
self.nodes = nodes
[388] Fix | Delete
self.lineno = lineno
[389] Fix | Delete
[390] Fix | Delete
def getChildren(self):
[391] Fix | Delete
return tuple(flatten(self.nodes))
[392] Fix | Delete
[393] Fix | Delete
def getChildNodes(self):
[394] Fix | Delete
nodelist = []
[395] Fix | Delete
nodelist.extend(flatten_nodes(self.nodes))
[396] Fix | Delete
return tuple(nodelist)
[397] Fix | Delete
[398] Fix | Delete
def __repr__(self):
[399] Fix | Delete
return "Decorators(%s)" % (repr(self.nodes),)
[400] Fix | Delete
[401] Fix | Delete
class Dict(Node):
[402] Fix | Delete
def __init__(self, items, lineno=None):
[403] Fix | Delete
self.items = items
[404] Fix | Delete
self.lineno = lineno
[405] Fix | Delete
[406] Fix | Delete
def getChildren(self):
[407] Fix | Delete
return tuple(flatten(self.items))
[408] Fix | Delete
[409] Fix | Delete
def getChildNodes(self):
[410] Fix | Delete
nodelist = []
[411] Fix | Delete
nodelist.extend(flatten_nodes(self.items))
[412] Fix | Delete
return tuple(nodelist)
[413] Fix | Delete
[414] Fix | Delete
def __repr__(self):
[415] Fix | Delete
return "Dict(%s)" % (repr(self.items),)
[416] Fix | Delete
[417] Fix | Delete
class Discard(Node):
[418] Fix | Delete
def __init__(self, expr, lineno=None):
[419] Fix | Delete
self.expr = expr
[420] Fix | Delete
self.lineno = lineno
[421] Fix | Delete
[422] Fix | Delete
def getChildren(self):
[423] Fix | Delete
return self.expr,
[424] Fix | Delete
[425] Fix | Delete
def getChildNodes(self):
[426] Fix | Delete
return self.expr,
[427] Fix | Delete
[428] Fix | Delete
def __repr__(self):
[429] Fix | Delete
return "Discard(%s)" % (repr(self.expr),)
[430] Fix | Delete
[431] Fix | Delete
class Div(Node):
[432] Fix | Delete
def __init__(self, leftright, lineno=None):
[433] Fix | Delete
self.left = leftright[0]
[434] Fix | Delete
self.right = leftright[1]
[435] Fix | Delete
self.lineno = lineno
[436] Fix | Delete
[437] Fix | Delete
def getChildren(self):
[438] Fix | Delete
return self.left, self.right
[439] Fix | Delete
[440] Fix | Delete
def getChildNodes(self):
[441] Fix | Delete
return self.left, self.right
[442] Fix | Delete
[443] Fix | Delete
def __repr__(self):
[444] Fix | Delete
return "Div((%s, %s))" % (repr(self.left), repr(self.right))
[445] Fix | Delete
[446] Fix | Delete
class Ellipsis(Node):
[447] Fix | Delete
def __init__(self, lineno=None):
[448] Fix | Delete
self.lineno = lineno
[449] Fix | Delete
[450] Fix | Delete
def getChildren(self):
[451] Fix | Delete
return ()
[452] Fix | Delete
[453] Fix | Delete
def getChildNodes(self):
[454] Fix | Delete
return ()
[455] Fix | Delete
[456] Fix | Delete
def __repr__(self):
[457] Fix | Delete
return "Ellipsis()"
[458] Fix | Delete
[459] Fix | Delete
class Exec(Node):
[460] Fix | Delete
def __init__(self, expr, locals, globals, lineno=None):
[461] Fix | Delete
self.expr = expr
[462] Fix | Delete
self.locals = locals
[463] Fix | Delete
self.globals = globals
[464] Fix | Delete
self.lineno = lineno
[465] Fix | Delete
[466] Fix | Delete
def getChildren(self):
[467] Fix | Delete
children = []
[468] Fix | Delete
children.append(self.expr)
[469] Fix | Delete
children.append(self.locals)
[470] Fix | Delete
children.append(self.globals)
[471] Fix | Delete
return tuple(children)
[472] Fix | Delete
[473] Fix | Delete
def getChildNodes(self):
[474] Fix | Delete
nodelist = []
[475] Fix | Delete
nodelist.append(self.expr)
[476] Fix | Delete
if self.locals is not None:
[477] Fix | Delete
nodelist.append(self.locals)
[478] Fix | Delete
if self.globals is not None:
[479] Fix | Delete
nodelist.append(self.globals)
[480] Fix | Delete
return tuple(nodelist)
[481] Fix | Delete
[482] Fix | Delete
def __repr__(self):
[483] Fix | Delete
return "Exec(%s, %s, %s)" % (repr(self.expr), repr(self.locals), repr(self.globals))
[484] Fix | Delete
[485] Fix | Delete
class FloorDiv(Node):
[486] Fix | Delete
def __init__(self, leftright, lineno=None):
[487] Fix | Delete
self.left = leftright[0]
[488] Fix | Delete
self.right = leftright[1]
[489] Fix | Delete
self.lineno = lineno
[490] Fix | Delete
[491] Fix | Delete
def getChildren(self):
[492] Fix | Delete
return self.left, self.right
[493] Fix | Delete
[494] Fix | Delete
def getChildNodes(self):
[495] Fix | Delete
return self.left, self.right
[496] Fix | Delete
[497] Fix | Delete
def __repr__(self):
[498] Fix | Delete
return "FloorDiv((%s, %s))" % (repr(self.left), repr(self.right))
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function