Home
last modified time | relevance | path

Searched refs:seq (Results 1 – 25 of 116) sorted by relevance

12345

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_index.py83 self.assertEqual(self.seq[self.n], self.seq[2])
84 self.assertEqual(self.seq[self.o], self.seq[-2])
91 self.assertEqual(self.seq[self.o:self.o2], self.seq[1:3])
92 self.assertEqual(self.seq[self.n:self.n2], self.seq[2:4])
95 seqlen = len(self.seq)
98 self.assertEqual(self.seq[self.o:], self.seq[0:0])
99 self.assertEqual(self.seq[:self.o], self.seq)
100 self.assertEqual(self.seq[self.n:], self.seq[0:0])
101 self.assertEqual(self.seq[:self.n], self.seq)
102 if isinstance(self.seq, ClassicSeq):
[all …]
Dtest_enumerate.py67 seq, res = 'abc', [(0,'a'), (1,'b'), (2,'c')] variable in EnumerateTestCase
70 self.assertEqual(type(self.enum(self.seq)), self.enum)
71 e = self.enum(self.seq)
73 self.assertEqual(list(self.enum(self.seq)), self.res)
77 self.assertEqual(list(self.enum(G(self.seq))), self.res)
82 self.assertEqual(list(self.enum(I(self.seq))), self.res)
87 self.assertEqual(list(self.enum(Ig(self.seq))), self.res)
92 self.assertRaises(TypeError, self.enum, X(self.seq))
95 self.assertRaises(TypeError, list, self.enum(N(self.seq)))
98 self.assertRaises(ZeroDivisionError, list, self.enum(E(self.seq)))
[all …]
Dtest_xrange.py65 seq = list(xrange(a, b, c))
66 self.assertIn(a, seq)
67 self.assertNotIn(b, seq)
68 self.assertEqual(len(seq), 2)
70 seq = list(xrange(b, a, -c))
71 self.assertIn(b, seq)
72 self.assertNotIn(a, seq)
73 self.assertEqual(len(seq), 2)
75 seq = list(xrange(-a, -b, -c))
76 self.assertIn(-a, seq)
[all …]
Dtest_iter.py53 def check_iterator(self, it, seq): argument
61 self.assertEqual(res, seq)
64 def check_for_loop(self, expr, seq): argument
68 self.assertEqual(res, seq)
76 seq = range(10)
77 it = iter(seq)
87 seq = range(3)
89 for i in iter(seq):
90 for j in iter(seq):
91 for k in iter(seq):
[all …]
Dtest_hash.py119 seq = range(10) variable in DefaultIterSeq
121 return len(self.seq)
123 return self.seq[index]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/
Dasdl.c7 asdl_seq *seq = NULL; in asdl_seq_new() local
25 seq = (asdl_seq *)PyArena_Malloc(arena, n); in asdl_seq_new()
26 if (!seq) { in asdl_seq_new()
30 memset(seq, 0, n); in asdl_seq_new()
31 seq->size = size; in asdl_seq_new()
32 return seq; in asdl_seq_new()
38 asdl_int_seq *seq = NULL; in asdl_int_seq_new() local
56 seq = (asdl_int_seq *)PyArena_Malloc(arena, n); in asdl_int_seq_new()
57 if (!seq) { in asdl_int_seq_new()
61 memset(seq, 0, n); in asdl_int_seq_new()
[all …]
Dsymtable.c220 asdl_seq *seq; in PySymtable_Build() local
238 seq = mod->v.Module.body; in PySymtable_Build()
239 for (i = 0; i < asdl_seq_LEN(seq); i++) in PySymtable_Build()
241 (stmt_ty)asdl_seq_GET(seq, i))) in PySymtable_Build()
249 seq = mod->v.Interactive.body; in PySymtable_Build()
250 for (i = 0; i < asdl_seq_LEN(seq); i++) in PySymtable_Build()
252 (stmt_ty)asdl_seq_GET(seq, i))) in PySymtable_Build()
956 asdl_seq *seq = (SEQ); /* avoid variable capture */ \
957 for (i = 0; i < asdl_seq_LEN(seq); i++) { \
958 TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, i); \
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Python/
Dasdl.c7 asdl_seq *seq = NULL; in asdl_seq_new() local
25 seq = (asdl_seq *)PyArena_Malloc(arena, n); in asdl_seq_new()
26 if (!seq) { in asdl_seq_new()
30 memset(seq, 0, n); in asdl_seq_new()
31 seq->size = size; in asdl_seq_new()
32 return seq; in asdl_seq_new()
38 asdl_int_seq *seq = NULL; in asdl_int_seq_new() local
56 seq = (asdl_int_seq *)PyArena_Malloc(arena, n); in asdl_int_seq_new()
57 if (!seq) { in asdl_int_seq_new()
61 memset(seq, 0, n); in asdl_int_seq_new()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/
Dmarkov.py12 def put(self, seq): argument
15 add(None, seq[:0])
16 for i in range(len(seq)):
17 add(seq[max(0, i-n):i], seq[i:i+1])
18 add(seq[len(seq)-n:], None)
24 seq = choice(trans[None])
26 subseq = seq[max(0, len(seq)-n):]
31 seq += next
32 return seq
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Objects/
Denumobject.c17 PyObject *seq = NULL; in enum_new() local
22 &seq, &start)) in enum_new()
48 en->en_sit = PyObject_GetIter(seq); in enum_new()
219 PyObject* seq; member
226 PyObject *seq, *reversed_meth; in reversed_new() local
233 if (!PyArg_UnpackTuple(args, "reversed", 1, 1, &seq) ) in reversed_new()
236 if (PyInstance_Check(seq)) { in reversed_new()
237 reversed_meth = PyObject_GetAttrString(seq, "__reversed__"); in reversed_new()
246 reversed_meth = _PyObject_LookupSpecial(seq, "__reversed__", in reversed_new()
257 if (!PySequence_Check(seq)) { in reversed_new()
[all …]
Drangeobject.c148 static PyObject * range_iter(PyObject *seq);
149 static PyObject * range_reverse(PyObject *seq);
268 range_iter(PyObject *seq) in range_iter() argument
272 if (!PyRange_Check(seq)) { in range_iter()
280 it->start = ((rangeobject *)seq)->start; in range_iter()
281 it->step = ((rangeobject *)seq)->step; in range_iter()
282 it->len = ((rangeobject *)seq)->len; in range_iter()
287 range_reverse(PyObject *seq) in range_reverse() argument
292 if (!PyRange_Check(seq)) { in range_reverse()
300 start = ((rangeobject *)seq)->start; in range_reverse()
[all …]
Diterobject.c12 PySeqIter_New(PyObject *seq) in PySeqIter_New() argument
16 if (!PySequence_Check(seq)) { in PySeqIter_New()
24 Py_INCREF(seq); in PySeqIter_New()
25 it->it_seq = seq; in PySeqIter_New()
49 PyObject *seq; in iter_iternext() local
54 seq = it->it_seq; in iter_iternext()
55 if (seq == NULL) in iter_iternext()
58 result = PySequence_GetItem(seq, it->it_index); in iter_iternext()
67 Py_DECREF(seq); in iter_iternext()
Dlistobject.c2475 static PyObject *list_iter(PyObject *seq);
2476 static PyObject *list_reversed(PyListObject* seq, PyObject* unused);
2690 PyObject *ins, *seq; in list_ass_subscript() local
2696 seq = list_slice((PyListObject*)value, 0, in list_ass_subscript()
2700 seq = PySequence_Fast(value, in list_ass_subscript()
2704 if (!seq) in list_ass_subscript()
2707 if (PySequence_Fast_GET_SIZE(seq) != slicelength) { in list_ass_subscript()
2712 PySequence_Fast_GET_SIZE(seq), in list_ass_subscript()
2714 Py_DECREF(seq); in list_ass_subscript()
2719 Py_DECREF(seq); in list_ass_subscript()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Objects/
Denumobject.c17 PyObject *seq = NULL; in enum_new() local
22 &seq, &start)) in enum_new()
48 en->en_sit = PyObject_GetIter(seq); in enum_new()
219 PyObject* seq; member
226 PyObject *seq, *reversed_meth; in reversed_new() local
233 if (!PyArg_UnpackTuple(args, "reversed", 1, 1, &seq) ) in reversed_new()
236 if (PyInstance_Check(seq)) { in reversed_new()
237 reversed_meth = PyObject_GetAttrString(seq, "__reversed__"); in reversed_new()
246 reversed_meth = _PyObject_LookupSpecial(seq, "__reversed__", in reversed_new()
257 if (!PySequence_Check(seq)) { in reversed_new()
[all …]
Drangeobject.c173 static PyObject * range_iter(PyObject *seq);
174 static PyObject * range_reverse(PyObject *seq);
293 range_iter(PyObject *seq) in range_iter() argument
297 if (!PyRange_Check(seq)) { in range_iter()
305 it->start = ((rangeobject *)seq)->start; in range_iter()
306 it->step = ((rangeobject *)seq)->step; in range_iter()
307 it->len = ((rangeobject *)seq)->len; in range_iter()
312 range_reverse(PyObject *seq) in range_reverse() argument
317 if (!PyRange_Check(seq)) { in range_reverse()
325 start = ((rangeobject *)seq)->start; in range_reverse()
[all …]
Diterobject.c12 PySeqIter_New(PyObject *seq) in PySeqIter_New() argument
16 if (!PySequence_Check(seq)) { in PySeqIter_New()
24 Py_INCREF(seq); in PySeqIter_New()
25 it->it_seq = seq; in PySeqIter_New()
49 PyObject *seq; in iter_iternext() local
54 seq = it->it_seq; in iter_iternext()
55 if (seq == NULL) in iter_iternext()
58 result = PySequence_GetItem(seq, it->it_index); in iter_iternext()
67 Py_DECREF(seq); in iter_iternext()
Dlistobject.c2476 static PyObject *list_iter(PyObject *seq);
2477 static PyObject *list_reversed(PyListObject* seq, PyObject* unused);
2691 PyObject *ins, *seq; in list_ass_subscript() local
2697 seq = list_slice((PyListObject*)value, 0, in list_ass_subscript()
2701 seq = PySequence_Fast(value, in list_ass_subscript()
2705 if (!seq) in list_ass_subscript()
2708 if (PySequence_Fast_GET_SIZE(seq) != slicelength) { in list_ass_subscript()
2713 PySequence_Fast_GET_SIZE(seq), in list_ass_subscript()
2715 Py_DECREF(seq); in list_ass_subscript()
2720 Py_DECREF(seq); in list_ass_subscript()
[all …]
Dtupleobject.c784 static PyObject *tuple_iter(PyObject *seq);
953 PyTupleObject *seq; in tupleiter_next() local
957 seq = it->it_seq; in tupleiter_next()
958 if (seq == NULL) in tupleiter_next()
960 assert(PyTuple_Check(seq)); in tupleiter_next()
962 if (it->it_index < PyTuple_GET_SIZE(seq)) { in tupleiter_next()
963 item = PyTuple_GET_ITEM(seq, it->it_index); in tupleiter_next()
969 Py_DECREF(seq); in tupleiter_next()
1024 tuple_iter(PyObject *seq) in tuple_iter() argument
1028 if (!PyTuple_Check(seq)) { in tuple_iter()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/
DRev.py63 def __init__(self, seq): argument
64 self.forw = seq
74 seq = self.forw
75 if isinstance(seq, list):
78 elif isinstance(seq, tuple):
81 elif isinstance(seq, str):
/device/linaro/hikey/installer/hikey/
Dhisi-idt.py144 def senddataframe(self,seq,data): argument
147 head += chr(seq&0xFF)
148 head += chr((~seq)&0xFF)
158 def sendtailframe(self,seq): argument
160 data += chr(seq&0xFF)
161 data += chr((~seq)&0xFF)
171 seq=1
173 self.senddataframe(seq,data[(seq-1)*self.MAX_DATA_LEN:seq*self.MAX_DATA_LEN])
174 seq = seq+1
176 self.senddataframe(seq,data[(seq-1)*self.MAX_DATA_LEN:])
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
Dmhlib.py321 for key, seq in sequences.iteritems():
323 s.fromlist(seq)
346 def parsesequence(self, seq): argument
360 if seq == 'all':
363 i = seq.find(':')
365 head, dir, tail = seq[:i], '', seq[i+1:]
369 raise Error, "bad message list %s" % seq
381 msg = "bad message list %s" % seq
401 i = seq.find('-')
403 begin = self._parseindex(seq[:i], all)
[all …]
DUserString.py14 def __init__(self, seq): argument
15 if isinstance(seq, basestring):
16 self.data = seq
17 elif isinstance(seq, UserString):
18 self.data = seq.data[:]
20 self.data = str(seq)
100 def join(self, seq): return self.data.join(seq) argument
D_strptime.py79 def __pad(self, seq, front): argument
81 seq = list(seq)
83 seq.insert(0, '')
85 seq.append('')
86 return seq
/device/linaro/bootloader/edk2/AppPkg/Applications/OrderedCollectionTest/
Dgentest.sh37 seq $RANGE_START $RANGE_STOP | sed 's/^/insert /'
42 seq $RANGE_START $RANGE_STOP | sed 's/^/delete /'
47 seq $RANGE_START $RANGE_STOP | tac | sed 's/^/delete /'
/device/google/contexthub/firmware/os/core/
DhostIntf.c123 uint32_t seq; member
179 static void hostIntfTxPacket(uint32_t reason, uint8_t len, uint32_t seq,
237 …c inline const struct NanohubCommand *hostIntfFindHandler(uint8_t *buf, size_t size, uint32_t *seq) in hostIntfFindHandler() argument
262 if (mTxRetrans.seq == packet->seq) { in hostIntfFindHandler()
269 *seq = packet->seq; in hostIntfFindHandler()
296 static void hostIntfTxPacket(__le32 reason, uint8_t len, uint32_t seq, in hostIntfTxPacket() argument
301 txPacket->seq = seq; in hostIntfTxPacket()
312 static void hostIntfTxNakPacket(__le32 reason, uint32_t seq, in hostIntfTxNakPacket() argument
317 txPacket->seq = seq; in hostIntfTxNakPacket()
411 hostIntfTxPacket(NANOHUB_REASON_ACK, 32, mTxRetrans.seq, hostIntfTxAckDone); in hostIntfTxSendAck()
[all …]

12345