Coverage Report

Created: 2025-07-11 06:59

/src/Python-3.8.3/Modules/clinic/_operator.c.h
Line
Count
Source (jump to first uncovered line)
1
/*[clinic input]
2
preserve
3
[clinic start generated code]*/
4
5
PyDoc_STRVAR(_operator_truth__doc__,
6
"truth($module, a, /)\n"
7
"--\n"
8
"\n"
9
"Return True if a is true, False otherwise.");
10
11
#define _OPERATOR_TRUTH_METHODDEF    \
12
    {"truth", (PyCFunction)_operator_truth, METH_O, _operator_truth__doc__},
13
14
static int
15
_operator_truth_impl(PyObject *module, PyObject *a);
16
17
static PyObject *
18
_operator_truth(PyObject *module, PyObject *a)
19
0
{
20
0
    PyObject *return_value = NULL;
21
0
    int _return_value;
22
23
0
    _return_value = _operator_truth_impl(module, a);
24
0
    if ((_return_value == -1) && PyErr_Occurred()) {
25
0
        goto exit;
26
0
    }
27
0
    return_value = PyBool_FromLong((long)_return_value);
28
29
0
exit:
30
0
    return return_value;
31
0
}
32
33
PyDoc_STRVAR(_operator_add__doc__,
34
"add($module, a, b, /)\n"
35
"--\n"
36
"\n"
37
"Same as a + b.");
38
39
#define _OPERATOR_ADD_METHODDEF    \
40
    {"add", (PyCFunction)(void(*)(void))_operator_add, METH_FASTCALL, _operator_add__doc__},
41
42
static PyObject *
43
_operator_add_impl(PyObject *module, PyObject *a, PyObject *b);
44
45
static PyObject *
46
_operator_add(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
47
0
{
48
0
    PyObject *return_value = NULL;
49
0
    PyObject *a;
50
0
    PyObject *b;
51
52
0
    if (!_PyArg_CheckPositional("add", nargs, 2, 2)) {
53
0
        goto exit;
54
0
    }
55
0
    a = args[0];
56
0
    b = args[1];
57
0
    return_value = _operator_add_impl(module, a, b);
58
59
0
exit:
60
0
    return return_value;
61
0
}
62
63
PyDoc_STRVAR(_operator_sub__doc__,
64
"sub($module, a, b, /)\n"
65
"--\n"
66
"\n"
67
"Same as a - b.");
68
69
#define _OPERATOR_SUB_METHODDEF    \
70
    {"sub", (PyCFunction)(void(*)(void))_operator_sub, METH_FASTCALL, _operator_sub__doc__},
71
72
static PyObject *
73
_operator_sub_impl(PyObject *module, PyObject *a, PyObject *b);
74
75
static PyObject *
76
_operator_sub(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
77
0
{
78
0
    PyObject *return_value = NULL;
79
0
    PyObject *a;
80
0
    PyObject *b;
81
82
0
    if (!_PyArg_CheckPositional("sub", nargs, 2, 2)) {
83
0
        goto exit;
84
0
    }
85
0
    a = args[0];
86
0
    b = args[1];
87
0
    return_value = _operator_sub_impl(module, a, b);
88
89
0
exit:
90
0
    return return_value;
91
0
}
92
93
PyDoc_STRVAR(_operator_mul__doc__,
94
"mul($module, a, b, /)\n"
95
"--\n"
96
"\n"
97
"Same as a * b.");
98
99
#define _OPERATOR_MUL_METHODDEF    \
100
    {"mul", (PyCFunction)(void(*)(void))_operator_mul, METH_FASTCALL, _operator_mul__doc__},
101
102
static PyObject *
103
_operator_mul_impl(PyObject *module, PyObject *a, PyObject *b);
104
105
static PyObject *
106
_operator_mul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
107
0
{
108
0
    PyObject *return_value = NULL;
109
0
    PyObject *a;
110
0
    PyObject *b;
111
112
0
    if (!_PyArg_CheckPositional("mul", nargs, 2, 2)) {
113
0
        goto exit;
114
0
    }
115
0
    a = args[0];
116
0
    b = args[1];
117
0
    return_value = _operator_mul_impl(module, a, b);
118
119
0
exit:
120
0
    return return_value;
121
0
}
122
123
PyDoc_STRVAR(_operator_matmul__doc__,
124
"matmul($module, a, b, /)\n"
125
"--\n"
126
"\n"
127
"Same as a @ b.");
128
129
#define _OPERATOR_MATMUL_METHODDEF    \
130
    {"matmul", (PyCFunction)(void(*)(void))_operator_matmul, METH_FASTCALL, _operator_matmul__doc__},
131
132
static PyObject *
133
_operator_matmul_impl(PyObject *module, PyObject *a, PyObject *b);
134
135
static PyObject *
136
_operator_matmul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
137
0
{
138
0
    PyObject *return_value = NULL;
139
0
    PyObject *a;
140
0
    PyObject *b;
141
142
0
    if (!_PyArg_CheckPositional("matmul", nargs, 2, 2)) {
143
0
        goto exit;
144
0
    }
145
0
    a = args[0];
146
0
    b = args[1];
147
0
    return_value = _operator_matmul_impl(module, a, b);
148
149
0
exit:
150
0
    return return_value;
151
0
}
152
153
PyDoc_STRVAR(_operator_floordiv__doc__,
154
"floordiv($module, a, b, /)\n"
155
"--\n"
156
"\n"
157
"Same as a // b.");
158
159
#define _OPERATOR_FLOORDIV_METHODDEF    \
160
    {"floordiv", (PyCFunction)(void(*)(void))_operator_floordiv, METH_FASTCALL, _operator_floordiv__doc__},
161
162
static PyObject *
163
_operator_floordiv_impl(PyObject *module, PyObject *a, PyObject *b);
164
165
static PyObject *
166
_operator_floordiv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
167
0
{
168
0
    PyObject *return_value = NULL;
169
0
    PyObject *a;
170
0
    PyObject *b;
171
172
0
    if (!_PyArg_CheckPositional("floordiv", nargs, 2, 2)) {
173
0
        goto exit;
174
0
    }
175
0
    a = args[0];
176
0
    b = args[1];
177
0
    return_value = _operator_floordiv_impl(module, a, b);
178
179
0
exit:
180
0
    return return_value;
181
0
}
182
183
PyDoc_STRVAR(_operator_truediv__doc__,
184
"truediv($module, a, b, /)\n"
185
"--\n"
186
"\n"
187
"Same as a / b.");
188
189
#define _OPERATOR_TRUEDIV_METHODDEF    \
190
    {"truediv", (PyCFunction)(void(*)(void))_operator_truediv, METH_FASTCALL, _operator_truediv__doc__},
191
192
static PyObject *
193
_operator_truediv_impl(PyObject *module, PyObject *a, PyObject *b);
194
195
static PyObject *
196
_operator_truediv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
197
0
{
198
0
    PyObject *return_value = NULL;
199
0
    PyObject *a;
200
0
    PyObject *b;
201
202
0
    if (!_PyArg_CheckPositional("truediv", nargs, 2, 2)) {
203
0
        goto exit;
204
0
    }
205
0
    a = args[0];
206
0
    b = args[1];
207
0
    return_value = _operator_truediv_impl(module, a, b);
208
209
0
exit:
210
0
    return return_value;
211
0
}
212
213
PyDoc_STRVAR(_operator_mod__doc__,
214
"mod($module, a, b, /)\n"
215
"--\n"
216
"\n"
217
"Same as a % b.");
218
219
#define _OPERATOR_MOD_METHODDEF    \
220
    {"mod", (PyCFunction)(void(*)(void))_operator_mod, METH_FASTCALL, _operator_mod__doc__},
221
222
static PyObject *
223
_operator_mod_impl(PyObject *module, PyObject *a, PyObject *b);
224
225
static PyObject *
226
_operator_mod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
227
0
{
228
0
    PyObject *return_value = NULL;
229
0
    PyObject *a;
230
0
    PyObject *b;
231
232
0
    if (!_PyArg_CheckPositional("mod", nargs, 2, 2)) {
233
0
        goto exit;
234
0
    }
235
0
    a = args[0];
236
0
    b = args[1];
237
0
    return_value = _operator_mod_impl(module, a, b);
238
239
0
exit:
240
0
    return return_value;
241
0
}
242
243
PyDoc_STRVAR(_operator_neg__doc__,
244
"neg($module, a, /)\n"
245
"--\n"
246
"\n"
247
"Same as -a.");
248
249
#define _OPERATOR_NEG_METHODDEF    \
250
    {"neg", (PyCFunction)_operator_neg, METH_O, _operator_neg__doc__},
251
252
PyDoc_STRVAR(_operator_pos__doc__,
253
"pos($module, a, /)\n"
254
"--\n"
255
"\n"
256
"Same as +a.");
257
258
#define _OPERATOR_POS_METHODDEF    \
259
    {"pos", (PyCFunction)_operator_pos, METH_O, _operator_pos__doc__},
260
261
PyDoc_STRVAR(_operator_abs__doc__,
262
"abs($module, a, /)\n"
263
"--\n"
264
"\n"
265
"Same as abs(a).");
266
267
#define _OPERATOR_ABS_METHODDEF    \
268
    {"abs", (PyCFunction)_operator_abs, METH_O, _operator_abs__doc__},
269
270
PyDoc_STRVAR(_operator_inv__doc__,
271
"inv($module, a, /)\n"
272
"--\n"
273
"\n"
274
"Same as ~a.");
275
276
#define _OPERATOR_INV_METHODDEF    \
277
    {"inv", (PyCFunction)_operator_inv, METH_O, _operator_inv__doc__},
278
279
PyDoc_STRVAR(_operator_invert__doc__,
280
"invert($module, a, /)\n"
281
"--\n"
282
"\n"
283
"Same as ~a.");
284
285
#define _OPERATOR_INVERT_METHODDEF    \
286
    {"invert", (PyCFunction)_operator_invert, METH_O, _operator_invert__doc__},
287
288
PyDoc_STRVAR(_operator_lshift__doc__,
289
"lshift($module, a, b, /)\n"
290
"--\n"
291
"\n"
292
"Same as a << b.");
293
294
#define _OPERATOR_LSHIFT_METHODDEF    \
295
    {"lshift", (PyCFunction)(void(*)(void))_operator_lshift, METH_FASTCALL, _operator_lshift__doc__},
296
297
static PyObject *
298
_operator_lshift_impl(PyObject *module, PyObject *a, PyObject *b);
299
300
static PyObject *
301
_operator_lshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
302
0
{
303
0
    PyObject *return_value = NULL;
304
0
    PyObject *a;
305
0
    PyObject *b;
306
307
0
    if (!_PyArg_CheckPositional("lshift", nargs, 2, 2)) {
308
0
        goto exit;
309
0
    }
310
0
    a = args[0];
311
0
    b = args[1];
312
0
    return_value = _operator_lshift_impl(module, a, b);
313
314
0
exit:
315
0
    return return_value;
316
0
}
317
318
PyDoc_STRVAR(_operator_rshift__doc__,
319
"rshift($module, a, b, /)\n"
320
"--\n"
321
"\n"
322
"Same as a >> b.");
323
324
#define _OPERATOR_RSHIFT_METHODDEF    \
325
    {"rshift", (PyCFunction)(void(*)(void))_operator_rshift, METH_FASTCALL, _operator_rshift__doc__},
326
327
static PyObject *
328
_operator_rshift_impl(PyObject *module, PyObject *a, PyObject *b);
329
330
static PyObject *
331
_operator_rshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
332
0
{
333
0
    PyObject *return_value = NULL;
334
0
    PyObject *a;
335
0
    PyObject *b;
336
337
0
    if (!_PyArg_CheckPositional("rshift", nargs, 2, 2)) {
338
0
        goto exit;
339
0
    }
340
0
    a = args[0];
341
0
    b = args[1];
342
0
    return_value = _operator_rshift_impl(module, a, b);
343
344
0
exit:
345
0
    return return_value;
346
0
}
347
348
PyDoc_STRVAR(_operator_not___doc__,
349
"not_($module, a, /)\n"
350
"--\n"
351
"\n"
352
"Same as not a.");
353
354
#define _OPERATOR_NOT__METHODDEF    \
355
    {"not_", (PyCFunction)_operator_not_, METH_O, _operator_not___doc__},
356
357
static int
358
_operator_not__impl(PyObject *module, PyObject *a);
359
360
static PyObject *
361
_operator_not_(PyObject *module, PyObject *a)
362
0
{
363
0
    PyObject *return_value = NULL;
364
0
    int _return_value;
365
366
0
    _return_value = _operator_not__impl(module, a);
367
0
    if ((_return_value == -1) && PyErr_Occurred()) {
368
0
        goto exit;
369
0
    }
370
0
    return_value = PyBool_FromLong((long)_return_value);
371
372
0
exit:
373
0
    return return_value;
374
0
}
375
376
PyDoc_STRVAR(_operator_and___doc__,
377
"and_($module, a, b, /)\n"
378
"--\n"
379
"\n"
380
"Same as a & b.");
381
382
#define _OPERATOR_AND__METHODDEF    \
383
    {"and_", (PyCFunction)(void(*)(void))_operator_and_, METH_FASTCALL, _operator_and___doc__},
384
385
static PyObject *
386
_operator_and__impl(PyObject *module, PyObject *a, PyObject *b);
387
388
static PyObject *
389
_operator_and_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
390
0
{
391
0
    PyObject *return_value = NULL;
392
0
    PyObject *a;
393
0
    PyObject *b;
394
395
0
    if (!_PyArg_CheckPositional("and_", nargs, 2, 2)) {
396
0
        goto exit;
397
0
    }
398
0
    a = args[0];
399
0
    b = args[1];
400
0
    return_value = _operator_and__impl(module, a, b);
401
402
0
exit:
403
0
    return return_value;
404
0
}
405
406
PyDoc_STRVAR(_operator_xor__doc__,
407
"xor($module, a, b, /)\n"
408
"--\n"
409
"\n"
410
"Same as a ^ b.");
411
412
#define _OPERATOR_XOR_METHODDEF    \
413
    {"xor", (PyCFunction)(void(*)(void))_operator_xor, METH_FASTCALL, _operator_xor__doc__},
414
415
static PyObject *
416
_operator_xor_impl(PyObject *module, PyObject *a, PyObject *b);
417
418
static PyObject *
419
_operator_xor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
420
0
{
421
0
    PyObject *return_value = NULL;
422
0
    PyObject *a;
423
0
    PyObject *b;
424
425
0
    if (!_PyArg_CheckPositional("xor", nargs, 2, 2)) {
426
0
        goto exit;
427
0
    }
428
0
    a = args[0];
429
0
    b = args[1];
430
0
    return_value = _operator_xor_impl(module, a, b);
431
432
0
exit:
433
0
    return return_value;
434
0
}
435
436
PyDoc_STRVAR(_operator_or___doc__,
437
"or_($module, a, b, /)\n"
438
"--\n"
439
"\n"
440
"Same as a | b.");
441
442
#define _OPERATOR_OR__METHODDEF    \
443
    {"or_", (PyCFunction)(void(*)(void))_operator_or_, METH_FASTCALL, _operator_or___doc__},
444
445
static PyObject *
446
_operator_or__impl(PyObject *module, PyObject *a, PyObject *b);
447
448
static PyObject *
449
_operator_or_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
450
0
{
451
0
    PyObject *return_value = NULL;
452
0
    PyObject *a;
453
0
    PyObject *b;
454
455
0
    if (!_PyArg_CheckPositional("or_", nargs, 2, 2)) {
456
0
        goto exit;
457
0
    }
458
0
    a = args[0];
459
0
    b = args[1];
460
0
    return_value = _operator_or__impl(module, a, b);
461
462
0
exit:
463
0
    return return_value;
464
0
}
465
466
PyDoc_STRVAR(_operator_iadd__doc__,
467
"iadd($module, a, b, /)\n"
468
"--\n"
469
"\n"
470
"Same as a += b.");
471
472
#define _OPERATOR_IADD_METHODDEF    \
473
    {"iadd", (PyCFunction)(void(*)(void))_operator_iadd, METH_FASTCALL, _operator_iadd__doc__},
474
475
static PyObject *
476
_operator_iadd_impl(PyObject *module, PyObject *a, PyObject *b);
477
478
static PyObject *
479
_operator_iadd(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
480
0
{
481
0
    PyObject *return_value = NULL;
482
0
    PyObject *a;
483
0
    PyObject *b;
484
485
0
    if (!_PyArg_CheckPositional("iadd", nargs, 2, 2)) {
486
0
        goto exit;
487
0
    }
488
0
    a = args[0];
489
0
    b = args[1];
490
0
    return_value = _operator_iadd_impl(module, a, b);
491
492
0
exit:
493
0
    return return_value;
494
0
}
495
496
PyDoc_STRVAR(_operator_isub__doc__,
497
"isub($module, a, b, /)\n"
498
"--\n"
499
"\n"
500
"Same as a -= b.");
501
502
#define _OPERATOR_ISUB_METHODDEF    \
503
    {"isub", (PyCFunction)(void(*)(void))_operator_isub, METH_FASTCALL, _operator_isub__doc__},
504
505
static PyObject *
506
_operator_isub_impl(PyObject *module, PyObject *a, PyObject *b);
507
508
static PyObject *
509
_operator_isub(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
510
0
{
511
0
    PyObject *return_value = NULL;
512
0
    PyObject *a;
513
0
    PyObject *b;
514
515
0
    if (!_PyArg_CheckPositional("isub", nargs, 2, 2)) {
516
0
        goto exit;
517
0
    }
518
0
    a = args[0];
519
0
    b = args[1];
520
0
    return_value = _operator_isub_impl(module, a, b);
521
522
0
exit:
523
0
    return return_value;
524
0
}
525
526
PyDoc_STRVAR(_operator_imul__doc__,
527
"imul($module, a, b, /)\n"
528
"--\n"
529
"\n"
530
"Same as a *= b.");
531
532
#define _OPERATOR_IMUL_METHODDEF    \
533
    {"imul", (PyCFunction)(void(*)(void))_operator_imul, METH_FASTCALL, _operator_imul__doc__},
534
535
static PyObject *
536
_operator_imul_impl(PyObject *module, PyObject *a, PyObject *b);
537
538
static PyObject *
539
_operator_imul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
540
0
{
541
0
    PyObject *return_value = NULL;
542
0
    PyObject *a;
543
0
    PyObject *b;
544
545
0
    if (!_PyArg_CheckPositional("imul", nargs, 2, 2)) {
546
0
        goto exit;
547
0
    }
548
0
    a = args[0];
549
0
    b = args[1];
550
0
    return_value = _operator_imul_impl(module, a, b);
551
552
0
exit:
553
0
    return return_value;
554
0
}
555
556
PyDoc_STRVAR(_operator_imatmul__doc__,
557
"imatmul($module, a, b, /)\n"
558
"--\n"
559
"\n"
560
"Same as a @= b.");
561
562
#define _OPERATOR_IMATMUL_METHODDEF    \
563
    {"imatmul", (PyCFunction)(void(*)(void))_operator_imatmul, METH_FASTCALL, _operator_imatmul__doc__},
564
565
static PyObject *
566
_operator_imatmul_impl(PyObject *module, PyObject *a, PyObject *b);
567
568
static PyObject *
569
_operator_imatmul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
570
0
{
571
0
    PyObject *return_value = NULL;
572
0
    PyObject *a;
573
0
    PyObject *b;
574
575
0
    if (!_PyArg_CheckPositional("imatmul", nargs, 2, 2)) {
576
0
        goto exit;
577
0
    }
578
0
    a = args[0];
579
0
    b = args[1];
580
0
    return_value = _operator_imatmul_impl(module, a, b);
581
582
0
exit:
583
0
    return return_value;
584
0
}
585
586
PyDoc_STRVAR(_operator_ifloordiv__doc__,
587
"ifloordiv($module, a, b, /)\n"
588
"--\n"
589
"\n"
590
"Same as a //= b.");
591
592
#define _OPERATOR_IFLOORDIV_METHODDEF    \
593
    {"ifloordiv", (PyCFunction)(void(*)(void))_operator_ifloordiv, METH_FASTCALL, _operator_ifloordiv__doc__},
594
595
static PyObject *
596
_operator_ifloordiv_impl(PyObject *module, PyObject *a, PyObject *b);
597
598
static PyObject *
599
_operator_ifloordiv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
600
0
{
601
0
    PyObject *return_value = NULL;
602
0
    PyObject *a;
603
0
    PyObject *b;
604
605
0
    if (!_PyArg_CheckPositional("ifloordiv", nargs, 2, 2)) {
606
0
        goto exit;
607
0
    }
608
0
    a = args[0];
609
0
    b = args[1];
610
0
    return_value = _operator_ifloordiv_impl(module, a, b);
611
612
0
exit:
613
0
    return return_value;
614
0
}
615
616
PyDoc_STRVAR(_operator_itruediv__doc__,
617
"itruediv($module, a, b, /)\n"
618
"--\n"
619
"\n"
620
"Same as a /= b.");
621
622
#define _OPERATOR_ITRUEDIV_METHODDEF    \
623
    {"itruediv", (PyCFunction)(void(*)(void))_operator_itruediv, METH_FASTCALL, _operator_itruediv__doc__},
624
625
static PyObject *
626
_operator_itruediv_impl(PyObject *module, PyObject *a, PyObject *b);
627
628
static PyObject *
629
_operator_itruediv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
630
0
{
631
0
    PyObject *return_value = NULL;
632
0
    PyObject *a;
633
0
    PyObject *b;
634
635
0
    if (!_PyArg_CheckPositional("itruediv", nargs, 2, 2)) {
636
0
        goto exit;
637
0
    }
638
0
    a = args[0];
639
0
    b = args[1];
640
0
    return_value = _operator_itruediv_impl(module, a, b);
641
642
0
exit:
643
0
    return return_value;
644
0
}
645
646
PyDoc_STRVAR(_operator_imod__doc__,
647
"imod($module, a, b, /)\n"
648
"--\n"
649
"\n"
650
"Same as a %= b.");
651
652
#define _OPERATOR_IMOD_METHODDEF    \
653
    {"imod", (PyCFunction)(void(*)(void))_operator_imod, METH_FASTCALL, _operator_imod__doc__},
654
655
static PyObject *
656
_operator_imod_impl(PyObject *module, PyObject *a, PyObject *b);
657
658
static PyObject *
659
_operator_imod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
660
0
{
661
0
    PyObject *return_value = NULL;
662
0
    PyObject *a;
663
0
    PyObject *b;
664
665
0
    if (!_PyArg_CheckPositional("imod", nargs, 2, 2)) {
666
0
        goto exit;
667
0
    }
668
0
    a = args[0];
669
0
    b = args[1];
670
0
    return_value = _operator_imod_impl(module, a, b);
671
672
0
exit:
673
0
    return return_value;
674
0
}
675
676
PyDoc_STRVAR(_operator_ilshift__doc__,
677
"ilshift($module, a, b, /)\n"
678
"--\n"
679
"\n"
680
"Same as a <<= b.");
681
682
#define _OPERATOR_ILSHIFT_METHODDEF    \
683
    {"ilshift", (PyCFunction)(void(*)(void))_operator_ilshift, METH_FASTCALL, _operator_ilshift__doc__},
684
685
static PyObject *
686
_operator_ilshift_impl(PyObject *module, PyObject *a, PyObject *b);
687
688
static PyObject *
689
_operator_ilshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
690
0
{
691
0
    PyObject *return_value = NULL;
692
0
    PyObject *a;
693
0
    PyObject *b;
694
695
0
    if (!_PyArg_CheckPositional("ilshift", nargs, 2, 2)) {
696
0
        goto exit;
697
0
    }
698
0
    a = args[0];
699
0
    b = args[1];
700
0
    return_value = _operator_ilshift_impl(module, a, b);
701
702
0
exit:
703
0
    return return_value;
704
0
}
705
706
PyDoc_STRVAR(_operator_irshift__doc__,
707
"irshift($module, a, b, /)\n"
708
"--\n"
709
"\n"
710
"Same as a >>= b.");
711
712
#define _OPERATOR_IRSHIFT_METHODDEF    \
713
    {"irshift", (PyCFunction)(void(*)(void))_operator_irshift, METH_FASTCALL, _operator_irshift__doc__},
714
715
static PyObject *
716
_operator_irshift_impl(PyObject *module, PyObject *a, PyObject *b);
717
718
static PyObject *
719
_operator_irshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
720
0
{
721
0
    PyObject *return_value = NULL;
722
0
    PyObject *a;
723
0
    PyObject *b;
724
725
0
    if (!_PyArg_CheckPositional("irshift", nargs, 2, 2)) {
726
0
        goto exit;
727
0
    }
728
0
    a = args[0];
729
0
    b = args[1];
730
0
    return_value = _operator_irshift_impl(module, a, b);
731
732
0
exit:
733
0
    return return_value;
734
0
}
735
736
PyDoc_STRVAR(_operator_iand__doc__,
737
"iand($module, a, b, /)\n"
738
"--\n"
739
"\n"
740
"Same as a &= b.");
741
742
#define _OPERATOR_IAND_METHODDEF    \
743
    {"iand", (PyCFunction)(void(*)(void))_operator_iand, METH_FASTCALL, _operator_iand__doc__},
744
745
static PyObject *
746
_operator_iand_impl(PyObject *module, PyObject *a, PyObject *b);
747
748
static PyObject *
749
_operator_iand(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
750
0
{
751
0
    PyObject *return_value = NULL;
752
0
    PyObject *a;
753
0
    PyObject *b;
754
755
0
    if (!_PyArg_CheckPositional("iand", nargs, 2, 2)) {
756
0
        goto exit;
757
0
    }
758
0
    a = args[0];
759
0
    b = args[1];
760
0
    return_value = _operator_iand_impl(module, a, b);
761
762
0
exit:
763
0
    return return_value;
764
0
}
765
766
PyDoc_STRVAR(_operator_ixor__doc__,
767
"ixor($module, a, b, /)\n"
768
"--\n"
769
"\n"
770
"Same as a ^= b.");
771
772
#define _OPERATOR_IXOR_METHODDEF    \
773
    {"ixor", (PyCFunction)(void(*)(void))_operator_ixor, METH_FASTCALL, _operator_ixor__doc__},
774
775
static PyObject *
776
_operator_ixor_impl(PyObject *module, PyObject *a, PyObject *b);
777
778
static PyObject *
779
_operator_ixor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
780
0
{
781
0
    PyObject *return_value = NULL;
782
0
    PyObject *a;
783
0
    PyObject *b;
784
785
0
    if (!_PyArg_CheckPositional("ixor", nargs, 2, 2)) {
786
0
        goto exit;
787
0
    }
788
0
    a = args[0];
789
0
    b = args[1];
790
0
    return_value = _operator_ixor_impl(module, a, b);
791
792
0
exit:
793
0
    return return_value;
794
0
}
795
796
PyDoc_STRVAR(_operator_ior__doc__,
797
"ior($module, a, b, /)\n"
798
"--\n"
799
"\n"
800
"Same as a |= b.");
801
802
#define _OPERATOR_IOR_METHODDEF    \
803
    {"ior", (PyCFunction)(void(*)(void))_operator_ior, METH_FASTCALL, _operator_ior__doc__},
804
805
static PyObject *
806
_operator_ior_impl(PyObject *module, PyObject *a, PyObject *b);
807
808
static PyObject *
809
_operator_ior(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
810
0
{
811
0
    PyObject *return_value = NULL;
812
0
    PyObject *a;
813
0
    PyObject *b;
814
815
0
    if (!_PyArg_CheckPositional("ior", nargs, 2, 2)) {
816
0
        goto exit;
817
0
    }
818
0
    a = args[0];
819
0
    b = args[1];
820
0
    return_value = _operator_ior_impl(module, a, b);
821
822
0
exit:
823
0
    return return_value;
824
0
}
825
826
PyDoc_STRVAR(_operator_concat__doc__,
827
"concat($module, a, b, /)\n"
828
"--\n"
829
"\n"
830
"Same as a + b, for a and b sequences.");
831
832
#define _OPERATOR_CONCAT_METHODDEF    \
833
    {"concat", (PyCFunction)(void(*)(void))_operator_concat, METH_FASTCALL, _operator_concat__doc__},
834
835
static PyObject *
836
_operator_concat_impl(PyObject *module, PyObject *a, PyObject *b);
837
838
static PyObject *
839
_operator_concat(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
840
0
{
841
0
    PyObject *return_value = NULL;
842
0
    PyObject *a;
843
0
    PyObject *b;
844
845
0
    if (!_PyArg_CheckPositional("concat", nargs, 2, 2)) {
846
0
        goto exit;
847
0
    }
848
0
    a = args[0];
849
0
    b = args[1];
850
0
    return_value = _operator_concat_impl(module, a, b);
851
852
0
exit:
853
0
    return return_value;
854
0
}
855
856
PyDoc_STRVAR(_operator_iconcat__doc__,
857
"iconcat($module, a, b, /)\n"
858
"--\n"
859
"\n"
860
"Same as a += b, for a and b sequences.");
861
862
#define _OPERATOR_ICONCAT_METHODDEF    \
863
    {"iconcat", (PyCFunction)(void(*)(void))_operator_iconcat, METH_FASTCALL, _operator_iconcat__doc__},
864
865
static PyObject *
866
_operator_iconcat_impl(PyObject *module, PyObject *a, PyObject *b);
867
868
static PyObject *
869
_operator_iconcat(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
870
0
{
871
0
    PyObject *return_value = NULL;
872
0
    PyObject *a;
873
0
    PyObject *b;
874
875
0
    if (!_PyArg_CheckPositional("iconcat", nargs, 2, 2)) {
876
0
        goto exit;
877
0
    }
878
0
    a = args[0];
879
0
    b = args[1];
880
0
    return_value = _operator_iconcat_impl(module, a, b);
881
882
0
exit:
883
0
    return return_value;
884
0
}
885
886
PyDoc_STRVAR(_operator_contains__doc__,
887
"contains($module, a, b, /)\n"
888
"--\n"
889
"\n"
890
"Same as b in a (note reversed operands).");
891
892
#define _OPERATOR_CONTAINS_METHODDEF    \
893
    {"contains", (PyCFunction)(void(*)(void))_operator_contains, METH_FASTCALL, _operator_contains__doc__},
894
895
static int
896
_operator_contains_impl(PyObject *module, PyObject *a, PyObject *b);
897
898
static PyObject *
899
_operator_contains(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
900
0
{
901
0
    PyObject *return_value = NULL;
902
0
    PyObject *a;
903
0
    PyObject *b;
904
0
    int _return_value;
905
906
0
    if (!_PyArg_CheckPositional("contains", nargs, 2, 2)) {
907
0
        goto exit;
908
0
    }
909
0
    a = args[0];
910
0
    b = args[1];
911
0
    _return_value = _operator_contains_impl(module, a, b);
912
0
    if ((_return_value == -1) && PyErr_Occurred()) {
913
0
        goto exit;
914
0
    }
915
0
    return_value = PyBool_FromLong((long)_return_value);
916
917
0
exit:
918
0
    return return_value;
919
0
}
920
921
PyDoc_STRVAR(_operator_indexOf__doc__,
922
"indexOf($module, a, b, /)\n"
923
"--\n"
924
"\n"
925
"Return the first index of b in a.");
926
927
#define _OPERATOR_INDEXOF_METHODDEF    \
928
    {"indexOf", (PyCFunction)(void(*)(void))_operator_indexOf, METH_FASTCALL, _operator_indexOf__doc__},
929
930
static Py_ssize_t
931
_operator_indexOf_impl(PyObject *module, PyObject *a, PyObject *b);
932
933
static PyObject *
934
_operator_indexOf(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
935
0
{
936
0
    PyObject *return_value = NULL;
937
0
    PyObject *a;
938
0
    PyObject *b;
939
0
    Py_ssize_t _return_value;
940
941
0
    if (!_PyArg_CheckPositional("indexOf", nargs, 2, 2)) {
942
0
        goto exit;
943
0
    }
944
0
    a = args[0];
945
0
    b = args[1];
946
0
    _return_value = _operator_indexOf_impl(module, a, b);
947
0
    if ((_return_value == -1) && PyErr_Occurred()) {
948
0
        goto exit;
949
0
    }
950
0
    return_value = PyLong_FromSsize_t(_return_value);
951
952
0
exit:
953
0
    return return_value;
954
0
}
955
956
PyDoc_STRVAR(_operator_countOf__doc__,
957
"countOf($module, a, b, /)\n"
958
"--\n"
959
"\n"
960
"Return the number of times b occurs in a.");
961
962
#define _OPERATOR_COUNTOF_METHODDEF    \
963
    {"countOf", (PyCFunction)(void(*)(void))_operator_countOf, METH_FASTCALL, _operator_countOf__doc__},
964
965
static Py_ssize_t
966
_operator_countOf_impl(PyObject *module, PyObject *a, PyObject *b);
967
968
static PyObject *
969
_operator_countOf(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
970
0
{
971
0
    PyObject *return_value = NULL;
972
0
    PyObject *a;
973
0
    PyObject *b;
974
0
    Py_ssize_t _return_value;
975
976
0
    if (!_PyArg_CheckPositional("countOf", nargs, 2, 2)) {
977
0
        goto exit;
978
0
    }
979
0
    a = args[0];
980
0
    b = args[1];
981
0
    _return_value = _operator_countOf_impl(module, a, b);
982
0
    if ((_return_value == -1) && PyErr_Occurred()) {
983
0
        goto exit;
984
0
    }
985
0
    return_value = PyLong_FromSsize_t(_return_value);
986
987
0
exit:
988
0
    return return_value;
989
0
}
990
991
PyDoc_STRVAR(_operator_getitem__doc__,
992
"getitem($module, a, b, /)\n"
993
"--\n"
994
"\n"
995
"Same as a[b].");
996
997
#define _OPERATOR_GETITEM_METHODDEF    \
998
    {"getitem", (PyCFunction)(void(*)(void))_operator_getitem, METH_FASTCALL, _operator_getitem__doc__},
999
1000
static PyObject *
1001
_operator_getitem_impl(PyObject *module, PyObject *a, PyObject *b);
1002
1003
static PyObject *
1004
_operator_getitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1005
0
{
1006
0
    PyObject *return_value = NULL;
1007
0
    PyObject *a;
1008
0
    PyObject *b;
1009
1010
0
    if (!_PyArg_CheckPositional("getitem", nargs, 2, 2)) {
1011
0
        goto exit;
1012
0
    }
1013
0
    a = args[0];
1014
0
    b = args[1];
1015
0
    return_value = _operator_getitem_impl(module, a, b);
1016
1017
0
exit:
1018
0
    return return_value;
1019
0
}
1020
1021
PyDoc_STRVAR(_operator_setitem__doc__,
1022
"setitem($module, a, b, c, /)\n"
1023
"--\n"
1024
"\n"
1025
"Same as a[b] = c.");
1026
1027
#define _OPERATOR_SETITEM_METHODDEF    \
1028
    {"setitem", (PyCFunction)(void(*)(void))_operator_setitem, METH_FASTCALL, _operator_setitem__doc__},
1029
1030
static PyObject *
1031
_operator_setitem_impl(PyObject *module, PyObject *a, PyObject *b,
1032
                       PyObject *c);
1033
1034
static PyObject *
1035
_operator_setitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1036
0
{
1037
0
    PyObject *return_value = NULL;
1038
0
    PyObject *a;
1039
0
    PyObject *b;
1040
0
    PyObject *c;
1041
1042
0
    if (!_PyArg_CheckPositional("setitem", nargs, 3, 3)) {
1043
0
        goto exit;
1044
0
    }
1045
0
    a = args[0];
1046
0
    b = args[1];
1047
0
    c = args[2];
1048
0
    return_value = _operator_setitem_impl(module, a, b, c);
1049
1050
0
exit:
1051
0
    return return_value;
1052
0
}
1053
1054
PyDoc_STRVAR(_operator_delitem__doc__,
1055
"delitem($module, a, b, /)\n"
1056
"--\n"
1057
"\n"
1058
"Same as del a[b].");
1059
1060
#define _OPERATOR_DELITEM_METHODDEF    \
1061
    {"delitem", (PyCFunction)(void(*)(void))_operator_delitem, METH_FASTCALL, _operator_delitem__doc__},
1062
1063
static PyObject *
1064
_operator_delitem_impl(PyObject *module, PyObject *a, PyObject *b);
1065
1066
static PyObject *
1067
_operator_delitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1068
0
{
1069
0
    PyObject *return_value = NULL;
1070
0
    PyObject *a;
1071
0
    PyObject *b;
1072
1073
0
    if (!_PyArg_CheckPositional("delitem", nargs, 2, 2)) {
1074
0
        goto exit;
1075
0
    }
1076
0
    a = args[0];
1077
0
    b = args[1];
1078
0
    return_value = _operator_delitem_impl(module, a, b);
1079
1080
0
exit:
1081
0
    return return_value;
1082
0
}
1083
1084
PyDoc_STRVAR(_operator_eq__doc__,
1085
"eq($module, a, b, /)\n"
1086
"--\n"
1087
"\n"
1088
"Same as a == b.");
1089
1090
#define _OPERATOR_EQ_METHODDEF    \
1091
    {"eq", (PyCFunction)(void(*)(void))_operator_eq, METH_FASTCALL, _operator_eq__doc__},
1092
1093
static PyObject *
1094
_operator_eq_impl(PyObject *module, PyObject *a, PyObject *b);
1095
1096
static PyObject *
1097
_operator_eq(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1098
0
{
1099
0
    PyObject *return_value = NULL;
1100
0
    PyObject *a;
1101
0
    PyObject *b;
1102
1103
0
    if (!_PyArg_CheckPositional("eq", nargs, 2, 2)) {
1104
0
        goto exit;
1105
0
    }
1106
0
    a = args[0];
1107
0
    b = args[1];
1108
0
    return_value = _operator_eq_impl(module, a, b);
1109
1110
0
exit:
1111
0
    return return_value;
1112
0
}
1113
1114
PyDoc_STRVAR(_operator_ne__doc__,
1115
"ne($module, a, b, /)\n"
1116
"--\n"
1117
"\n"
1118
"Same as a != b.");
1119
1120
#define _OPERATOR_NE_METHODDEF    \
1121
    {"ne", (PyCFunction)(void(*)(void))_operator_ne, METH_FASTCALL, _operator_ne__doc__},
1122
1123
static PyObject *
1124
_operator_ne_impl(PyObject *module, PyObject *a, PyObject *b);
1125
1126
static PyObject *
1127
_operator_ne(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1128
0
{
1129
0
    PyObject *return_value = NULL;
1130
0
    PyObject *a;
1131
0
    PyObject *b;
1132
1133
0
    if (!_PyArg_CheckPositional("ne", nargs, 2, 2)) {
1134
0
        goto exit;
1135
0
    }
1136
0
    a = args[0];
1137
0
    b = args[1];
1138
0
    return_value = _operator_ne_impl(module, a, b);
1139
1140
0
exit:
1141
0
    return return_value;
1142
0
}
1143
1144
PyDoc_STRVAR(_operator_lt__doc__,
1145
"lt($module, a, b, /)\n"
1146
"--\n"
1147
"\n"
1148
"Same as a < b.");
1149
1150
#define _OPERATOR_LT_METHODDEF    \
1151
    {"lt", (PyCFunction)(void(*)(void))_operator_lt, METH_FASTCALL, _operator_lt__doc__},
1152
1153
static PyObject *
1154
_operator_lt_impl(PyObject *module, PyObject *a, PyObject *b);
1155
1156
static PyObject *
1157
_operator_lt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1158
0
{
1159
0
    PyObject *return_value = NULL;
1160
0
    PyObject *a;
1161
0
    PyObject *b;
1162
1163
0
    if (!_PyArg_CheckPositional("lt", nargs, 2, 2)) {
1164
0
        goto exit;
1165
0
    }
1166
0
    a = args[0];
1167
0
    b = args[1];
1168
0
    return_value = _operator_lt_impl(module, a, b);
1169
1170
0
exit:
1171
0
    return return_value;
1172
0
}
1173
1174
PyDoc_STRVAR(_operator_le__doc__,
1175
"le($module, a, b, /)\n"
1176
"--\n"
1177
"\n"
1178
"Same as a <= b.");
1179
1180
#define _OPERATOR_LE_METHODDEF    \
1181
    {"le", (PyCFunction)(void(*)(void))_operator_le, METH_FASTCALL, _operator_le__doc__},
1182
1183
static PyObject *
1184
_operator_le_impl(PyObject *module, PyObject *a, PyObject *b);
1185
1186
static PyObject *
1187
_operator_le(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1188
0
{
1189
0
    PyObject *return_value = NULL;
1190
0
    PyObject *a;
1191
0
    PyObject *b;
1192
1193
0
    if (!_PyArg_CheckPositional("le", nargs, 2, 2)) {
1194
0
        goto exit;
1195
0
    }
1196
0
    a = args[0];
1197
0
    b = args[1];
1198
0
    return_value = _operator_le_impl(module, a, b);
1199
1200
0
exit:
1201
0
    return return_value;
1202
0
}
1203
1204
PyDoc_STRVAR(_operator_gt__doc__,
1205
"gt($module, a, b, /)\n"
1206
"--\n"
1207
"\n"
1208
"Same as a > b.");
1209
1210
#define _OPERATOR_GT_METHODDEF    \
1211
    {"gt", (PyCFunction)(void(*)(void))_operator_gt, METH_FASTCALL, _operator_gt__doc__},
1212
1213
static PyObject *
1214
_operator_gt_impl(PyObject *module, PyObject *a, PyObject *b);
1215
1216
static PyObject *
1217
_operator_gt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1218
0
{
1219
0
    PyObject *return_value = NULL;
1220
0
    PyObject *a;
1221
0
    PyObject *b;
1222
1223
0
    if (!_PyArg_CheckPositional("gt", nargs, 2, 2)) {
1224
0
        goto exit;
1225
0
    }
1226
0
    a = args[0];
1227
0
    b = args[1];
1228
0
    return_value = _operator_gt_impl(module, a, b);
1229
1230
0
exit:
1231
0
    return return_value;
1232
0
}
1233
1234
PyDoc_STRVAR(_operator_ge__doc__,
1235
"ge($module, a, b, /)\n"
1236
"--\n"
1237
"\n"
1238
"Same as a >= b.");
1239
1240
#define _OPERATOR_GE_METHODDEF    \
1241
    {"ge", (PyCFunction)(void(*)(void))_operator_ge, METH_FASTCALL, _operator_ge__doc__},
1242
1243
static PyObject *
1244
_operator_ge_impl(PyObject *module, PyObject *a, PyObject *b);
1245
1246
static PyObject *
1247
_operator_ge(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1248
0
{
1249
0
    PyObject *return_value = NULL;
1250
0
    PyObject *a;
1251
0
    PyObject *b;
1252
1253
0
    if (!_PyArg_CheckPositional("ge", nargs, 2, 2)) {
1254
0
        goto exit;
1255
0
    }
1256
0
    a = args[0];
1257
0
    b = args[1];
1258
0
    return_value = _operator_ge_impl(module, a, b);
1259
1260
0
exit:
1261
0
    return return_value;
1262
0
}
1263
1264
PyDoc_STRVAR(_operator_pow__doc__,
1265
"pow($module, a, b, /)\n"
1266
"--\n"
1267
"\n"
1268
"Same as a ** b.");
1269
1270
#define _OPERATOR_POW_METHODDEF    \
1271
    {"pow", (PyCFunction)(void(*)(void))_operator_pow, METH_FASTCALL, _operator_pow__doc__},
1272
1273
static PyObject *
1274
_operator_pow_impl(PyObject *module, PyObject *a, PyObject *b);
1275
1276
static PyObject *
1277
_operator_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1278
0
{
1279
0
    PyObject *return_value = NULL;
1280
0
    PyObject *a;
1281
0
    PyObject *b;
1282
1283
0
    if (!_PyArg_CheckPositional("pow", nargs, 2, 2)) {
1284
0
        goto exit;
1285
0
    }
1286
0
    a = args[0];
1287
0
    b = args[1];
1288
0
    return_value = _operator_pow_impl(module, a, b);
1289
1290
0
exit:
1291
0
    return return_value;
1292
0
}
1293
1294
PyDoc_STRVAR(_operator_ipow__doc__,
1295
"ipow($module, a, b, /)\n"
1296
"--\n"
1297
"\n"
1298
"Same as a **= b.");
1299
1300
#define _OPERATOR_IPOW_METHODDEF    \
1301
    {"ipow", (PyCFunction)(void(*)(void))_operator_ipow, METH_FASTCALL, _operator_ipow__doc__},
1302
1303
static PyObject *
1304
_operator_ipow_impl(PyObject *module, PyObject *a, PyObject *b);
1305
1306
static PyObject *
1307
_operator_ipow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1308
0
{
1309
0
    PyObject *return_value = NULL;
1310
0
    PyObject *a;
1311
0
    PyObject *b;
1312
1313
0
    if (!_PyArg_CheckPositional("ipow", nargs, 2, 2)) {
1314
0
        goto exit;
1315
0
    }
1316
0
    a = args[0];
1317
0
    b = args[1];
1318
0
    return_value = _operator_ipow_impl(module, a, b);
1319
1320
0
exit:
1321
0
    return return_value;
1322
0
}
1323
1324
PyDoc_STRVAR(_operator_index__doc__,
1325
"index($module, a, /)\n"
1326
"--\n"
1327
"\n"
1328
"Same as a.__index__()");
1329
1330
#define _OPERATOR_INDEX_METHODDEF    \
1331
    {"index", (PyCFunction)_operator_index, METH_O, _operator_index__doc__},
1332
1333
PyDoc_STRVAR(_operator_is___doc__,
1334
"is_($module, a, b, /)\n"
1335
"--\n"
1336
"\n"
1337
"Same as a is b.");
1338
1339
#define _OPERATOR_IS__METHODDEF    \
1340
    {"is_", (PyCFunction)(void(*)(void))_operator_is_, METH_FASTCALL, _operator_is___doc__},
1341
1342
static PyObject *
1343
_operator_is__impl(PyObject *module, PyObject *a, PyObject *b);
1344
1345
static PyObject *
1346
_operator_is_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1347
0
{
1348
0
    PyObject *return_value = NULL;
1349
0
    PyObject *a;
1350
0
    PyObject *b;
1351
1352
0
    if (!_PyArg_CheckPositional("is_", nargs, 2, 2)) {
1353
0
        goto exit;
1354
0
    }
1355
0
    a = args[0];
1356
0
    b = args[1];
1357
0
    return_value = _operator_is__impl(module, a, b);
1358
1359
0
exit:
1360
0
    return return_value;
1361
0
}
1362
1363
PyDoc_STRVAR(_operator_is_not__doc__,
1364
"is_not($module, a, b, /)\n"
1365
"--\n"
1366
"\n"
1367
"Same as a is not b.");
1368
1369
#define _OPERATOR_IS_NOT_METHODDEF    \
1370
    {"is_not", (PyCFunction)(void(*)(void))_operator_is_not, METH_FASTCALL, _operator_is_not__doc__},
1371
1372
static PyObject *
1373
_operator_is_not_impl(PyObject *module, PyObject *a, PyObject *b);
1374
1375
static PyObject *
1376
_operator_is_not(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1377
0
{
1378
0
    PyObject *return_value = NULL;
1379
0
    PyObject *a;
1380
0
    PyObject *b;
1381
1382
0
    if (!_PyArg_CheckPositional("is_not", nargs, 2, 2)) {
1383
0
        goto exit;
1384
0
    }
1385
0
    a = args[0];
1386
0
    b = args[1];
1387
0
    return_value = _operator_is_not_impl(module, a, b);
1388
1389
0
exit:
1390
0
    return return_value;
1391
0
}
1392
1393
PyDoc_STRVAR(_operator_length_hint__doc__,
1394
"length_hint($module, obj, default=0, /)\n"
1395
"--\n"
1396
"\n"
1397
"Return an estimate of the number of items in obj.\n"
1398
"\n"
1399
"This is useful for presizing containers when building from an iterable.\n"
1400
"\n"
1401
"If the object supports len(), the result will be exact.\n"
1402
"Otherwise, it may over- or under-estimate by an arbitrary amount.\n"
1403
"The result will be an integer >= 0.");
1404
1405
#define _OPERATOR_LENGTH_HINT_METHODDEF    \
1406
    {"length_hint", (PyCFunction)(void(*)(void))_operator_length_hint, METH_FASTCALL, _operator_length_hint__doc__},
1407
1408
static Py_ssize_t
1409
_operator_length_hint_impl(PyObject *module, PyObject *obj,
1410
                           Py_ssize_t default_value);
1411
1412
static PyObject *
1413
_operator_length_hint(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1414
0
{
1415
0
    PyObject *return_value = NULL;
1416
0
    PyObject *obj;
1417
0
    Py_ssize_t default_value = 0;
1418
0
    Py_ssize_t _return_value;
1419
1420
0
    if (!_PyArg_CheckPositional("length_hint", nargs, 1, 2)) {
1421
0
        goto exit;
1422
0
    }
1423
0
    obj = args[0];
1424
0
    if (nargs < 2) {
1425
0
        goto skip_optional;
1426
0
    }
1427
0
    if (PyFloat_Check(args[1])) {
1428
0
        PyErr_SetString(PyExc_TypeError,
1429
0
                        "integer argument expected, got float" );
1430
0
        goto exit;
1431
0
    }
1432
0
    {
1433
0
        Py_ssize_t ival = -1;
1434
0
        PyObject *iobj = PyNumber_Index(args[1]);
1435
0
        if (iobj != NULL) {
1436
0
            ival = PyLong_AsSsize_t(iobj);
1437
0
            Py_DECREF(iobj);
1438
0
        }
1439
0
        if (ival == -1 && PyErr_Occurred()) {
1440
0
            goto exit;
1441
0
        }
1442
0
        default_value = ival;
1443
0
    }
1444
0
skip_optional:
1445
0
    _return_value = _operator_length_hint_impl(module, obj, default_value);
1446
0
    if ((_return_value == -1) && PyErr_Occurred()) {
1447
0
        goto exit;
1448
0
    }
1449
0
    return_value = PyLong_FromSsize_t(_return_value);
1450
1451
0
exit:
1452
0
    return return_value;
1453
0
}
1454
1455
PyDoc_STRVAR(_operator__compare_digest__doc__,
1456
"_compare_digest($module, a, b, /)\n"
1457
"--\n"
1458
"\n"
1459
"Return \'a == b\'.\n"
1460
"\n"
1461
"This function uses an approach designed to prevent\n"
1462
"timing analysis, making it appropriate for cryptography.\n"
1463
"\n"
1464
"a and b must both be of the same type: either str (ASCII only),\n"
1465
"or any bytes-like object.\n"
1466
"\n"
1467
"Note: If a and b are of different lengths, or if an error occurs,\n"
1468
"a timing attack could theoretically reveal information about the\n"
1469
"types and lengths of a and b--but not their values.");
1470
1471
#define _OPERATOR__COMPARE_DIGEST_METHODDEF    \
1472
    {"_compare_digest", (PyCFunction)(void(*)(void))_operator__compare_digest, METH_FASTCALL, _operator__compare_digest__doc__},
1473
1474
static PyObject *
1475
_operator__compare_digest_impl(PyObject *module, PyObject *a, PyObject *b);
1476
1477
static PyObject *
1478
_operator__compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1479
0
{
1480
0
    PyObject *return_value = NULL;
1481
0
    PyObject *a;
1482
0
    PyObject *b;
1483
1484
0
    if (!_PyArg_CheckPositional("_compare_digest", nargs, 2, 2)) {
1485
0
        goto exit;
1486
0
    }
1487
0
    a = args[0];
1488
0
    b = args[1];
1489
0
    return_value = _operator__compare_digest_impl(module, a, b);
1490
1491
0
exit:
1492
0
    return return_value;
1493
0
}
1494
/*[clinic end generated code: output=e7ed71a8c475a901 input=a9049054013a1b77]*/