Returns the current ABC cache token.
-The token is an opaque object (supporting equality testing) identifying the
-current version of the ABC cache for virtual subclasses. The token changes
-with every call to register() on any ABC.
+The token is an opaque object (supporting equality testing) identifying
+the current version of the ABC cache for virtual subclasses. The token
+changes with every call to register() on any ABC.
[clinic start generated code]*/
static PyObject *
_abc_get_cache_token_impl(PyObject *module)
-/*[clinic end generated code: output=c7d87841e033dacc input=70413d1c423ad9f9]*/
+/*[clinic end generated code: output=c7d87841e033dacc input=d87acc04492f6bf3]*/
{
_abcmodule_state *state = get_abc_state(module);
return PyLong_FromUnsignedLongLong(get_invalidation_counter(state));
If the future has been cancelled, raises CancelledError. If the
future's result isn't yet available, raises InvalidStateError. If
-the future is done and has an exception set, this exception is raised.
+the future is done and has an exception set, this exception is
+raised.
[clinic start generated code]*/
static PyObject *
_asyncio_Future_result_impl(FutureObj *self)
-/*[clinic end generated code: output=f35f940936a4b1e5 input=61d89f48e4c8b670]*/
+/*[clinic end generated code: output=f35f940936a4b1e5 input=ee20e126776cbb04]*/
{
asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
PyObject *result;
Add a callback to be run when the future becomes done.
-The callback is called with a single argument - the future object. If
-the future is already done when this is called, the callback is
+The callback is called with a single argument - the future object.
+If the future is already done when this is called, the callback is
scheduled with call_soon.
[clinic start generated code]*/
static PyObject *
_asyncio_Future_add_done_callback_impl(FutureObj *self, PyTypeObject *cls,
PyObject *fn, PyObject *context)
-/*[clinic end generated code: output=922e9a4cbd601167 input=37d97f941beb7b3e]*/
+/*[clinic end generated code: output=922e9a4cbd601167 input=f4f6adb074cd3e0f]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
if (context == NULL) {
Cancel the future and schedule callbacks.
-If the future is already done or cancelled, return False. Otherwise,
-change the future's state to cancelled, schedule the callbacks and
-return True.
+If the future is already done or cancelled, return False.
+Otherwise, change the future's state to cancelled, schedule the
+callbacks and return True.
[clinic start generated code]*/
static PyObject *
_asyncio_Future_cancel_impl(FutureObj *self, PyTypeObject *cls,
PyObject *msg)
-/*[clinic end generated code: output=074956f35904b034 input=44ab4003da839970]*/
+/*[clinic end generated code: output=074956f35904b034 input=0c9157547a964c4c]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
ENSURE_FUTURE_ALIVE(state, self)
Return True if the future is done.
-Done means either that a result / exception are available, or that the
-future was cancelled.
+Done means either that a result / exception are available, or that
+the future was cancelled.
[clinic start generated code]*/
static PyObject *
_asyncio_Future_done_impl(FutureObj *self)
-/*[clinic end generated code: output=244c5ac351145096 input=7204d3cc63bef7f3]*/
+/*[clinic end generated code: output=244c5ac351145096 input=acf2c2347f3c01d8]*/
{
if (!future_is_alive(self) || self->fut_state == STATE_PENDING) {
Py_RETURN_FALSE;
/*[clinic input]
+@permit_long_summary
_asyncio._swap_current_task
loop: object
static PyObject *
_asyncio__swap_current_task_impl(PyObject *module, PyObject *loop,
PyObject *task)
-/*[clinic end generated code: output=9f88de958df74c7e input=c9c72208d3d38b6c]*/
+/*[clinic end generated code: output=9f88de958df74c7e input=ec14ed25855e3068]*/
{
_PyThreadStateImpl *ts = (_PyThreadStateImpl *)_PyThreadState_GET();
return swap_current_task(ts, loop, task);
Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e <= x, and all e in
-a[i:] have e > x. So if x already appears in the list, a.insert(i, x) will
-insert just after the rightmost x already there.
+a[i:] have e > x. So if x already appears in the list, a.insert(i, x)
+will insert just after the rightmost x already there.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
static Py_ssize_t
_bisect_bisect_right_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=3a4bc09cc7c8a73d input=b476bc45667273ac]*/
+/*[clinic end generated code: output=3a4bc09cc7c8a73d input=27717afe1a61bfaa]*/
{
return internal_bisect_right(a, x, lo, hi, key);
}
Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and all e in
-a[i:] have e >= x. So if x already appears in the list, a.insert(i, x) will
-insert just before the leftmost x already there.
+a[i:] have e >= x. So if x already appears in the list, a.insert(i, x)
+will insert just before the leftmost x already there.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
static Py_ssize_t
_bisect_bisect_left_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=70749d6e5cae9284 input=9b4d49b5ddecfad7]*/
+/*[clinic end generated code: output=70749d6e5cae9284 input=259fedbe35e882e1]*/
{
return internal_bisect_left(a, x, lo, hi, key);
}
}
/*[clinic input]
-@permit_long_docstring_body
_bz2.BZ2Decompressor.decompress
data: Py_buffer
Decompress *data*, returning uncompressed data as bytes.
-If *max_length* is nonnegative, returns at most *max_length* bytes of
-decompressed data. If this limit is reached and further output can be
-produced, *self.needs_input* will be set to ``False``. In this case, the next
-call to *decompress()* may provide *data* as b'' to obtain more of the output.
+If *max_length* is nonnegative, returns at most *max_length* bytes
+of decompressed data. If this limit is reached and further output
+can be produced, *self.needs_input* will be set to ``False``. In
+this case, the next call to *decompress()* may provide *data* as b''
+to obtain more of the output.
-If all of the input data was decompressed and returned (either because this
-was less than *max_length* bytes, or because *max_length* was negative),
-*self.needs_input* will be set to True.
+If all of the input data was decompressed and returned (either
+because this was less than *max_length* bytes, or because
+*max_length* was negative), *self.needs_input* will be set to True.
-Attempting to decompress data after the end of stream is reached raises an
-EOFError. Any data found after the end of the stream is ignored and saved in
-the unused_data attribute.
+Attempting to decompress data after the end of stream is reached
+raises an EOFError. Any data found after the end of the stream is
+ignored and saved in the unused_data attribute.
[clinic start generated code]*/
static PyObject *
_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=23e41045deb240a3 input=3703e78f91757655]*/
+/*[clinic end generated code: output=23e41045deb240a3 input=7f68faa9ff7a1b51]*/
{
PyObject *result = NULL;
Register a codec search function.
-Search functions are expected to take one argument, the encoding name in
-all lower case letters, and either return None, or a tuple of functions
-(encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).
+Search functions are expected to take one argument, the encoding
+name in all lower case letters, and either return None, or a tuple
+of functions (encoder, decoder, stream_reader, stream_writer) (or
+a CodecInfo object).
[clinic start generated code]*/
static PyObject *
_codecs_register(PyObject *module, PyObject *search_function)
-/*[clinic end generated code: output=d1bf21e99db7d6d3 input=369578467955cae4]*/
+/*[clinic end generated code: output=d1bf21e99db7d6d3 input=2321d8c8c0420dfc]*/
{
if (PyCodec_Register(search_function))
return NULL;
Encodes obj using the codec registered for encoding.
The default encoding is 'utf-8'. errors may be given to set a
-different error handling scheme. Default is 'strict' meaning that encoding
-errors raise a ValueError. Other possible values are 'ignore', 'replace'
-and 'backslashreplace' as well as any other name registered with
-codecs.register_error that can handle ValueErrors.
+different error handling scheme. Default is 'strict' meaning that
+encoding errors raise a ValueError. Other possible values are 'ignore',
+'replace' and 'backslashreplace' as well as any other name registered
+with codecs.register_error that can handle ValueErrors.
[clinic start generated code]*/
static PyObject *
_codecs_encode_impl(PyObject *module, PyObject *obj, const char *encoding,
const char *errors)
-/*[clinic end generated code: output=385148eb9a067c86 input=cd5b685040ff61f0]*/
+/*[clinic end generated code: output=385148eb9a067c86 input=e5271d443e391d7f]*/
{
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
Decodes obj using the codec registered for encoding.
Default encoding is 'utf-8'. errors may be given to set a
-different error handling scheme. Default is 'strict' meaning that encoding
-errors raise a ValueError. Other possible values are 'ignore', 'replace'
-and 'backslashreplace' as well as any other name registered with
-codecs.register_error that can handle ValueErrors.
+different error handling scheme. Default is 'strict' meaning that
+encoding errors raise a ValueError. Other possible values are 'ignore',
+'replace' and 'backslashreplace' as well as any other name registered
+with codecs.register_error that can handle ValueErrors.
[clinic start generated code]*/
static PyObject *
_codecs_decode_impl(PyObject *module, PyObject *obj, const char *encoding,
const char *errors)
-/*[clinic end generated code: output=679882417dc3a0bd input=7702c0cc2fa1add6]*/
+/*[clinic end generated code: output=679882417dc3a0bd input=3e6254628f9ca538]*/
{
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
Register the specified error handler under the name errors.
handler must be a callable object, that will be called with an exception
-instance containing information about the location of the encoding/decoding
-error and must return a (replacement, new position) tuple.
+instance containing information about the location of the
+encoding/decoding error and must return a (replacement, new position)
+tuple.
[clinic start generated code]*/
static PyObject *
_codecs_register_error_impl(PyObject *module, const char *errors,
PyObject *handler)
-/*[clinic end generated code: output=fa2f7d1879b3067d input=5e6709203c2e33fe]*/
+/*[clinic end generated code: output=fa2f7d1879b3067d input=5bea01dfe835d9d8]*/
{
if (PyCodec_RegisterError(errors, handler))
return NULL;
lookup_error(errors) -> handler
-Return the error handler for the specified error handling name or raise a
-LookupError, if no handler exists under this name.
+Return the error handler for the specified error handling name or raise
+a LookupError, if no handler exists under this name.
[clinic start generated code]*/
static PyObject *
_codecs_lookup_error_impl(PyObject *module, const char *name)
-/*[clinic end generated code: output=087f05dc0c9a98cc input=4775dd65e6235aba]*/
+/*[clinic end generated code: output=087f05dc0c9a98cc input=86cfb6a7a9c67113]*/
{
return PyCodec_LookupError(name);
}
}
/*[clinic input]
+@permit_long_summary
@critical_section
_collections.deque.rotate as deque_rotate
static PyObject *
deque_rotate_impl(dequeobject *deque, Py_ssize_t n)
-/*[clinic end generated code: output=96c2402a371eb15d input=5bf834296246e002]*/
+/*[clinic end generated code: output=96c2402a371eb15d input=3543c3b2297de8f1]*/
{
if (!_deque_rotate(deque, n))
Py_RETURN_NONE;
}
/*[clinic input]
-@permit_long_docstring_body
@classmethod
datetime.date.fromtimestamp
Create a date from a POSIX timestamp.
-The timestamp is a number, e.g. created via time.time(), that is interpreted
-as local time.
+The timestamp is a number, e.g. created via time.time(), that is
+interpreted as local time.
[clinic start generated code]*/
static PyObject *
datetime_date_fromtimestamp_impl(PyTypeObject *type, PyObject *timestamp)
-/*[clinic end generated code: output=59def4e32c028fb6 input=55ff6940f0a8339f]*/
+/*[clinic end generated code: output=59def4e32c028fb6 input=15720eef43b169a1]*/
{
return date_fromtimestamp(type, timestamp);
}
}
/*[clinic input]
+@permit_long_summary
@classmethod
datetime.date.strptime
static PyObject *
datetime_date_strptime_impl(PyTypeObject *type, PyObject *string,
PyObject *format)
-/*[clinic end generated code: output=454d473bee2d5161 input=31d57bb789433e99]*/
+/*[clinic end generated code: output=454d473bee2d5161 input=2db8f0b2b5242deb]*/
{
PyObject *result;
}
/*[clinic input]
+@permit_long_summary
@classmethod
datetime.time.strptime
static PyObject *
datetime_time_strptime_impl(PyTypeObject *type, PyObject *string,
PyObject *format)
-/*[clinic end generated code: output=ae05a9bc0241d3bf input=82ba425ecacc54aa]*/
+/*[clinic end generated code: output=ae05a9bc0241d3bf input=f01d0b9eb5383da5]*/
{
PyObject *result;
Return the time formatted according to ISO.
-The full format is 'HH:MM:SS.mmmmmm+zz:zz'. By default, the fractional
-part is omitted if self.microsecond == 0.
+The full format is 'HH:MM:SS.mmmmmm+zz:zz'. By default, the
+fractional part is omitted if self.microsecond == 0.
The optional argument timespec specifies the number of additional
terms of the time to include. Valid options are 'auto', 'hours',
static PyObject *
datetime_time_isoformat_impl(PyDateTime_Time *self, const char *timespec)
-/*[clinic end generated code: output=2bcc7cab65c35545 input=afbbbd953d10ad07]*/
+/*[clinic end generated code: output=2bcc7cab65c35545 input=0efae103081060f4]*/
{
char buf[100];
}
/*[clinic input]
-@permit_long_docstring_body
datetime.time.strftime
format: unicode
Format using strftime().
-The date part of the timestamp passed to underlying strftime should not be used.
+The date part of the timestamp passed to underlying strftime should
+not be used.
For a list of supported format codes, see the documentation:
https://docs.python.org/3/library/datetime.html#format-codes
static PyObject *
datetime_time_strftime_impl(PyDateTime_Time *self, PyObject *format)
-/*[clinic end generated code: output=10f65af20e2a78c7 input=c4a5bbecd798654b]*/
+/*[clinic end generated code: output=10f65af20e2a78c7 input=184e1c0d7d356c5d]*/
{
PyObject *result;
PyObject *tuple;
A combination of a date and a time.
-The year, month and day arguments are required. tzinfo may be None, or an
-instance of a tzinfo subclass. The remaining arguments may be ints.
+The year, month and day arguments are required. tzinfo may be None, or
+an instance of a tzinfo subclass. The remaining arguments may be ints.
[clinic start generated code]*/
static PyObject *
datetime_datetime_impl(PyTypeObject *type, int year, int month, int day,
int hour, int minute, int second, int microsecond,
PyObject *tzinfo, int fold)
-/*[clinic end generated code: output=47983ddb47d36037 input=2af468d7a9c1e568]*/
+/*[clinic end generated code: output=47983ddb47d36037 input=c7fd85dcf6fe9691]*/
{
return new_datetime_ex2(year, month, day,
hour, minute, second, microsecond,
}
/*[clinic input]
-@permit_long_docstring_body
@classmethod
datetime.datetime.fromtimestamp
Create a datetime from a POSIX timestamp.
-The timestamp is a number, e.g. created via time.time(), that is interpreted
-as local time.
+The timestamp is a number, e.g. created via time.time(), that is
+interpreted as local time.
[clinic start generated code]*/
static PyObject *
datetime_datetime_fromtimestamp_impl(PyTypeObject *type, PyObject *timestamp,
PyObject *tzinfo)
-/*[clinic end generated code: output=9c47ea2b2ebdaded input=d6b5b2095c5a34b2]*/
+/*[clinic end generated code: output=9c47ea2b2ebdaded input=7a2bc81a049ea287]*/
{
PyObject *self;
if (check_tzinfo_subclass(tzinfo) < 0)
Return the value for key if present, otherwise default.
-If key is not in the database, it is inserted with default as the value.
+If key is not in the database, it is inserted with default as the
+value.
[clinic start generated code]*/
static PyObject *
_dbm_dbm_setdefault_impl(dbmobject *self, PyTypeObject *cls, const char *key,
Py_ssize_t key_length, PyObject *default_value)
-/*[clinic end generated code: output=9c2f6ea6d0fb576c input=c01510ef7571e13b]*/
+/*[clinic end generated code: output=9c2f6ea6d0fb576c input=81224965c110f830]*/
{
datum dbm_key, val;
Py_ssize_t tmp_size;
/* helpers for handling of arbitrary element-like objects */
/*[clinic input]
+@permit_long_summary
_elementtree._set_factories
comment_factory: object
static PyObject *
_elementtree__set_factories_impl(PyObject *module, PyObject *comment_factory,
PyObject *pi_factory)
-/*[clinic end generated code: output=813b408adee26535 input=99d17627aea7fb3b]*/
+/*[clinic end generated code: output=813b408adee26535 input=0f415cb6b821f768]*/
{
elementtreestate *st = get_elementtree_state(module);
PyObject *old;
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
_functools.reduce
function as func: object
Apply a function of two arguments cumulatively to the items of an iterable, from left to right.
-This effectively reduces the iterable to a single value. If initial is present,
-it is placed before the items of the iterable in the calculation, and serves as
-a default when the iterable is empty.
+This effectively reduces the iterable to a single value. If initial is
+present, it is placed before the items of the iterable in the
+calculation, and serves as a default when the iterable is empty.
For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])
calculates ((((1 + 2) + 3) + 4) + 5).
static PyObject *
_functools_reduce_impl(PyObject *module, PyObject *func, PyObject *seq,
PyObject *result)
-/*[clinic end generated code: output=30d898fe1267c79d input=5c9088c98ffe2793]*/
+/*[clinic end generated code: output=30d898fe1267c79d input=ff4d5c73100e72e8]*/
{
PyObject *args, *it;
Return the starting key for the traversal.
-It's possible to loop over every key in the database using this method
-and the nextkey() method. The traversal is ordered by GDBM's internal
-hash values, and won't be sorted by the key values.
+It's possible to loop over every key in the database using this
+method and the nextkey() method. The traversal is ordered by GDBM's
+internal hash values, and won't be sorted by the key values.
[clinic start generated code]*/
static PyObject *
_gdbm_gdbm_firstkey_impl(gdbmobject *self, PyTypeObject *cls)
-/*[clinic end generated code: output=139275e9c8b60827 input=aad5a7c886c542f5]*/
+/*[clinic end generated code: output=139275e9c8b60827 input=ba40f0d81eae0f35]*/
{
PyObject *v;
datum key;
Returns the key that follows key in the traversal.
-The following code prints every key in the database db, without having
-to create a list in memory that contains them all:
+The following code prints every key in the database db, without
+having to create a list in memory that contains them all:
k = db.firstkey()
while k is not None:
static PyObject *
_gdbm_gdbm_nextkey_impl(gdbmobject *self, PyTypeObject *cls, const char *key,
Py_ssize_t key_length)
-/*[clinic end generated code: output=c81a69300ef41766 input=181f1130d5bfeb1e]*/
+/*[clinic end generated code: output=c81a69300ef41766 input=78293a913b02387e]*/
{
PyObject *v;
datum dbm_key, nextkey;
If you have carried out a lot of deletions and would like to shrink
the space used by the GDBM file, this routine will reorganize the
-database. GDBM will not shorten the length of a database file except
-by using this reorganization; otherwise, deleted file space will be
-kept and reused as new (key,value) pairs are added.
+database. GDBM will not shorten the length of a database file
+except by using this reorganization; otherwise, deleted file space
+will be kept and reused as new (key,value) pairs are added.
[clinic start generated code]*/
static PyObject *
_gdbm_gdbm_reorganize_impl(gdbmobject *self, PyTypeObject *cls)
-/*[clinic end generated code: output=d77c69e8e3dd644a input=3e3ca0d2ea787861]*/
+/*[clinic end generated code: output=d77c69e8e3dd644a input=d7fcf03051c6f7cd]*/
{
_gdbm_state *state = PyType_GetModuleState(cls);
assert(state != NULL);
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
_hashlib.HMAC.hexdigest
Return hexadecimal digest of the bytes passed to the update() method so far.
-This may be used to exchange the value safely in email or other non-binary
-environments.
+This may be used to exchange the value safely in email or other
+non-binary environments.
[clinic start generated code]*/
static PyObject *
_hashlib_HMAC_hexdigest_impl(HMACobject *self)
-/*[clinic end generated code: output=80d825be1eaae6a7 input=5e48db83ab1a4d19]*/
+/*[clinic end generated code: output=80d825be1eaae6a7 input=e37a84c36a43787c]*/
{
unsigned char buf[EVP_MAX_MD_SIZE];
Py_ssize_t n = _hmac_digest(self, buf);
Determine the OpenSSL FIPS mode of operation.
For OpenSSL 3.0.0 and newer it returns the state of the default provider
-in the default OSSL context. It's not quite the same as FIPS_mode() but good
-enough for unittests.
+in the default OSSL context. It's not quite the same as FIPS_mode() but
+good enough for unittests.
Effectively any non-zero return value indicates FIPS mode;
values other than 1 may have additional significance.
static int
_hashlib_get_fips_mode_impl(PyObject *module)
-/*[clinic end generated code: output=87eece1bab4d3fa9 input=2db61538c41c6fef]*/
+/*[clinic end generated code: output=87eece1bab4d3fa9 input=a6cdb6901421d122]*/
{
#ifdef Py_HAS_OPENSSL3_SUPPORT
}
/*[clinic input]
+@permit_long_summary
@critical_section heap
_heapq.heappushpop
static PyObject *
_heapq_heappushpop_impl(PyObject *module, PyObject *heap, PyObject *item)
-/*[clinic end generated code: output=67231dc98ed5774f input=db05c81b1dd92c44]*/
+/*[clinic end generated code: output=67231dc98ed5774f input=491178a1c7d417ba]*/
{
PyObject *returnitem;
int cmp;
Maxheap variant of heappushpop.
-The combined action runs more efficiently than heappush_max() followed by
-a separate call to heappop_max().
+The combined action runs more efficiently than heappush_max()
+followed by a separate call to heappop_max().
[clinic start generated code]*/
static PyObject *
_heapq_heappushpop_max_impl(PyObject *module, PyObject *heap, PyObject *item)
-/*[clinic end generated code: output=ff0019f0941aca0d input=24d0defa6fd6df4a]*/
+/*[clinic end generated code: output=ff0019f0941aca0d input=52030929667a4c08]*/
{
PyObject *returnitem;
int cmp;
Clear and destroy the queue.
-Afterward attempts to use the queue will behave as though it never existed.
+Afterward attempts to use the queue will behave as though it never
+existed.
[clinic start generated code]*/
static PyObject *
_interpqueues_destroy_impl(PyObject *module, int64_t qid)
-/*[clinic end generated code: output=46b35623f080cbff input=8632bba87f81e3e9]*/
+/*[clinic end generated code: output=46b35623f080cbff input=75136ad807e28677]*/
{
int err = queue_destroy(&_globals.queues, qid);
if (handle_queue_error(err, module, qid)) {
Execute the body of the provided function in the identified interpreter.
Code objects are also supported. In both cases, closures and args
-are not supported. Methods and other callables are not supported either.
+are not supported. Methods and other callables are not supported
+either.
(See _interpreters.exec().)
[clinic start generated code]*/
static PyObject *
_interpreters_run_func_impl(PyObject *module, PyObject *id, PyObject *func,
PyObject *shared, int restricted)
-/*[clinic end generated code: output=131f7202ca4a0c5e input=2d62bb9b9eaf4948]*/
+/*[clinic end generated code: output=131f7202ca4a0c5e input=162b29823b33d5cc]*/
{
#define FUNCNAME MODULE_NAME_STR ".run_func"
PyThreadState *tstate = _PyThreadState_GET();
/*[clinic input]
+@permit_long_summary
_interpreters.get_config
id: object
*
static PyObject *
_interpreters_get_config_impl(PyObject *module, PyObject *id, int restricted)
-/*[clinic end generated code: output=56773353b9b7224a input=59519a01c22d96d1]*/
+/*[clinic end generated code: output=56773353b9b7224a input=8272d9ea9e4fb42a]*/
{
if (id == Py_None) {
id = NULL;
/*[clinic input]
-@permit_long_docstring_body
_interpreters.capture_exception
exc as exc_arg: object = None
Return a snapshot of an exception.
-If "exc" is None then the current exception, if any, is used (but not cleared).
-The returned snapshot is the same as what _interpreters.exec() returns.
+If "exc" is None then the current exception, if any, is used (but not
+cleared). The returned snapshot is the same as what
+_interpreters.exec() returns.
[clinic start generated code]*/
static PyObject *
_interpreters_capture_exception_impl(PyObject *module, PyObject *exc_arg)
-/*[clinic end generated code: output=ef3f5393ef9c88a6 input=6c4dcb78fb722217]*/
+/*[clinic end generated code: output=ef3f5393ef9c88a6 input=4e6289f8f2a47b5b]*/
{
PyObject *exc = exc_arg;
if (exc == NULL || exc == Py_None) {
ValueError on attempt to decode an invalid string. If strict is False
then literal control characters are allowed in the string.
-Returns a tuple of the decoded string and the index of the character in s
-after the end quote.
+Returns a tuple of the decoded string and the index of the character in
+s after the end quote.
[clinic start generated code]*/
static PyObject *
py_scanstring_impl(PyObject *module, PyObject *pystr, Py_ssize_t end,
int strict)
-/*[clinic end generated code: output=961740cfae07cdb3 input=cff59e47498f4d8e]*/
+/*[clinic end generated code: output=961740cfae07cdb3 input=6d5abb5947ccc297]*/
{
Py_ssize_t next_end = -1;
PyObject *rval = scanstring_unicode(pystr, end, strict, &next_end);
}
/*[clinic input]
-@permit_long_docstring_body
_lzma.LZMADecompressor.decompress
data: Py_buffer
Decompress *data*, returning uncompressed data as bytes.
-If *max_length* is nonnegative, returns at most *max_length* bytes of
-decompressed data. If this limit is reached and further output can be
-produced, *self.needs_input* will be set to ``False``. In this case, the next
-call to *decompress()* may provide *data* as b'' to obtain more of the output.
+If *max_length* is nonnegative, returns at most *max_length* bytes
+of decompressed data. If this limit is reached and further output
+can be produced, *self.needs_input* will be set to ``False``. In
+this case, the next call to *decompress()* may provide *data* as b''
+to obtain more of the output.
-If all of the input data was decompressed and returned (either because this
-was less than *max_length* bytes, or because *max_length* was negative),
-*self.needs_input* will be set to True.
+If all of the input data was decompressed and returned (either
+because this was less than *max_length* bytes, or because
+*max_length* was negative), *self.needs_input* will be set to True.
-Attempting to decompress data after the end of stream is reached raises an
-EOFError. Any data found after the end of the stream is ignored and saved in
-the unused_data attribute.
+Attempting to decompress data after the end of stream is reached
+raises an EOFError. Any data found after the end of the stream is
+ignored and saved in the unused_data attribute.
[clinic start generated code]*/
static PyObject *
_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=ef4e20ec7122241d input=d5cbd45801b4b8b0]*/
+/*[clinic end generated code: output=ef4e20ec7122241d input=0eb62669c4315dee]*/
{
PyObject *result = NULL;
"\n"
"Remove a shared memory object (similar to unlink()).\n"
"\n"
-"Remove a shared memory object name, and, once all processes have unmapped\n"
-"the object, de-allocates and destroys the contents of the associated memory\n"
-"region.");
+"Remove a shared memory object name, and, once all processes have\n"
+"unmapped the object, de-allocates and destroys the contents of the\n"
+"associated memory region.");
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF \
{"shm_unlink", (PyCFunction)_posixshmem_shm_unlink, METH_O, _posixshmem_shm_unlink__doc__},
#ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF
#endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */
-/*[clinic end generated code: output=74588a5abba6e36c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e69afacce7b0595e input=a9049054013a1b77]*/
Remove a shared memory object (similar to unlink()).
-Remove a shared memory object name, and, once all processes have unmapped
-the object, de-allocates and destroys the contents of the associated memory
-region.
+Remove a shared memory object name, and, once all processes have
+unmapped the object, de-allocates and destroys the contents of the
+associated memory region.
[clinic start generated code]*/
static PyObject *
_posixshmem_shm_unlink_impl(PyObject *module, PyObject *path)
-/*[clinic end generated code: output=42f8b23d134b9ff5 input=298369d013dcad63]*/
+/*[clinic end generated code: output=42f8b23d134b9ff5 input=cf7a30ec6503cf78]*/
{
int rv;
int async_err = 0;
}
/*[clinic input]
-
+@permit_long_summary
_opcode.has_name -> bool
opcode: int
static int
_opcode_has_name_impl(PyObject *module, int opcode)
-/*[clinic end generated code: output=b49a83555c2fa517 input=448aa5e4bcc947ba]*/
+/*[clinic end generated code: output=b49a83555c2fa517 input=8faf669024d97fad]*/
{
return IS_VALID_OPCODE(opcode) && OPCODE_HAS_NAME(opcode);
}
}
/*[clinic input]
-@permit_long_docstring_body
_posixsubprocess.fork_exec as subprocess_fork_exec
args as process_args: object
executable_list: object
Spawn a fresh new child process.
-Fork a child process, close parent file descriptors as appropriate in the
-child and duplicate the few that are needed before calling exec() in the
-child process.
+Fork a child process, close parent file descriptors as appropriate in
+the child and duplicate the few that are needed before calling exec() in
+the child process.
-If close_fds is True, close file descriptors 3 and higher, except those listed
-in the sorted tuple pass_fds.
+If close_fds is True, close file descriptors 3 and higher, except those
+listed in the sorted tuple pass_fds.
-The preexec_fn, if supplied, will be called immediately before closing file
-descriptors and exec.
+The preexec_fn, if supplied, will be called immediately before closing
+file descriptors and exec.
WARNING: preexec_fn is NOT SAFE if your application uses threads.
It may trigger infrequent, difficult to debug deadlocks.
PyObject *extra_groups_packed,
PyObject *uid_object, int child_umask,
PyObject *preexec_fn)
-/*[clinic end generated code: output=288464dc56e373c7 input=58e0db771686f4f6]*/
+/*[clinic end generated code: output=288464dc56e373c7 input=5e56eac3e036e349]*/
{
PyObject *converted_args = NULL, *fast_args = NULL;
PyObject *preexec_fn_args_tuple = NULL;
Put the item on the queue.
-The optional 'block' and 'timeout' arguments are ignored, as this method
-never blocks. They are provided for compatibility with the Queue class.
+The optional 'block' and 'timeout' arguments are ignored, as this
+method never blocks. They are provided for compatibility with the
+Queue class.
[clinic start generated code]*/
static PyObject *
_queue_SimpleQueue_put_impl(simplequeueobject *self, PyObject *item,
int block, PyObject *timeout)
-/*[clinic end generated code: output=4333136e88f90d8b input=a16dbb33363c0fa8]*/
+/*[clinic end generated code: output=4333136e88f90d8b input=9f9ff270a74670c3]*/
{
if (self->has_threads_waiting) {
HandoffData data = {
Remove and return an item from the queue.
-If optional args 'block' is true and 'timeout' is None (the default),
-block if necessary until an item is available. If 'timeout' is
-a non-negative number, it blocks at most 'timeout' seconds and raises
-the Empty exception if no item was available within that time.
+If optional args 'block' is true and 'timeout' is None (the
+default), block if necessary until an item is available. If
+'timeout' is a non-negative number, it blocks at most 'timeout'
+seconds and raises the Empty exception if no item was available
+within that time.
Otherwise ('block' is false), return an item if one is immediately
available, else raise the Empty exception ('timeout' is ignored
in that case).
static PyObject *
_queue_SimpleQueue_get_impl(simplequeueobject *self, PyTypeObject *cls,
int block, PyObject *timeout_obj)
-/*[clinic end generated code: output=5c2cca914cd1e55b input=f7836c65e5839c51]*/
+/*[clinic end generated code: output=5c2cca914cd1e55b input=afa0889bbc6b4761]*/
{
PyTime_t endtime = 0;
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Match.span
group: object(c_default="NULL") = 0
static PyObject *
_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group)
-/*[clinic end generated code: output=f02ae40594d14fe6 input=8fa6014e982d71d4]*/
+/*[clinic end generated code: output=f02ae40594d14fe6 input=834cfe444f0f55cf]*/
{
Py_ssize_t index = match_getindex(self, group);
}
/*[clinic input]
-@permit_long_docstring_body
@critical_section
@getter
_ssl._SSLSocket.context
This changes the context associated with the SSLSocket.
-This is typically used from within a callback function set by the sni_callback
-on the SSLContext to change the certificate information associated with the
-SSLSocket before the cryptographic exchange handshake messages.
+This is typically used from within a callback function set by the
+sni_callback on the SSLContext to change the certificate information
+associated with the SSLSocket before the cryptographic exchange
+handshake messages.
[clinic start generated code]*/
static PyObject *
_ssl__SSLSocket_context_get_impl(PySSLSocket *self)
-/*[clinic end generated code: output=d23e82f72f32e3d7 input=0cc8e773a079295e]*/
+/*[clinic end generated code: output=d23e82f72f32e3d7 input=b845dea1f9710ebe]*/
{
return Py_NewRef(self->ctx);
}
/*[clinic input]
-@permit_long_docstring_body
@critical_section
@setter
_ssl._SSLSocket.context
static int
_ssl__SSLSocket_context_set_impl(PySSLSocket *self, PyObject *value)
-/*[clinic end generated code: output=6b0a6cc5cf33d9fe input=f7fc1674b660df96]*/
+/*[clinic end generated code: output=6b0a6cc5cf33d9fe input=48ece77724fd9dd4]*/
{
if (PyObject_TypeCheck(value, self->ctx->state->PySSLContext_Type)) {
Py_SETREF(self->ctx, (PySSLContext *)Py_NewRef(value));
#ifdef BIO_get_ktls_send
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
@critical_section
_ssl._SSLSocket.sendfile
fd: int
Write size bytes from offset in the file descriptor fd to the SSL connection.
-This method uses the zero-copy technique and returns the number of bytes
-written. It should be called only when Kernel TLS is used for sending data in
-the connection.
+This method uses the zero-copy technique and returns the number of
+bytes written. It should be called only when Kernel TLS is used for
+sending data in the connection.
The meaning of flags is platform dependent.
[clinic start generated code]*/
static PyObject *
_ssl__SSLSocket_sendfile_impl(PySSLSocket *self, int fd, Py_off_t offset,
size_t size, int flags)
-/*[clinic end generated code: output=0c6815b0719ca8d5 input=1f193e681bbae664]*/
+/*[clinic end generated code: output=0c6815b0719ca8d5 input=68c7fbf90c9a8a1b]*/
{
Py_ssize_t retval;
int sockstate;
}
/*[clinic input]
-@permit_long_docstring_body
@critical_section
_ssl._SSLSocket.get_channel_binding
cb_type: str = "tls-unique"
Get channel binding data for current connection.
-Raise ValueError if the requested `cb_type` is not supported. Return bytes
-of the data or None if the data is not available (e.g. before the handshake).
+Raise ValueError if the requested `cb_type` is not supported.
+Return bytes of the data or None if the data is not available (e.g.
+before the handshake).
Only 'tls-unique' channel binding data from RFC 5929 is supported.
[clinic start generated code]*/
static PyObject *
_ssl__SSLSocket_get_channel_binding_impl(PySSLSocket *self,
const char *cb_type)
-/*[clinic end generated code: output=34bac9acb6a61d31 input=26fad522435ecca1]*/
+/*[clinic end generated code: output=34bac9acb6a61d31 input=bed81ef7936535a0]*/
{
char buf[PySSL_CB_MAXLEN];
size_t len;
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
@critical_section
@getter
_ssl._SSLContext.sni_callback
Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.
-If the argument is None then the callback is disabled. The method is called
-with the SSLSocket, the server name as a string, and the SSLContext object.
+If the argument is None then the callback is disabled. The method
+is called with the SSLSocket, the server name as a string, and the
+SSLContext object.
See RFC 6066 for details of the SNI extension.
[clinic start generated code]*/
static PyObject *
_ssl__SSLContext_sni_callback_get_impl(PySSLContext *self)
-/*[clinic end generated code: output=961e6575cdfaf036 input=3aee06696b0874d9]*/
+/*[clinic end generated code: output=961e6575cdfaf036 input=a319bc8fc15d6fc8]*/
{
PyObject *cb = self->set_sni_cb;
if (cb == NULL) {
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
@critical_section
@setter
_ssl._SSLContext.sni_callback
static int
_ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value)
-/*[clinic end generated code: output=b32736c6b891f61a input=332def1d8c81d549]*/
+/*[clinic end generated code: output=b32736c6b891f61a input=402b43fb06c1139e]*/
{
if (self->protocol == PY_SSL_VERSION_TLS_CLIENT) {
PyErr_SetString(PyExc_ValueError,
Returns quantities of loaded X.509 certificates.
-X.509 certificates with a CA extension and certificate revocation lists
-inside the context's cert store.
+X.509 certificates with a CA extension and certificate revocation
+lists inside the context's cert store.
-NOTE: Certificates in a capath directory aren't loaded unless they have
-been used at least once.
+NOTE: Certificates in a capath directory aren't loaded unless they
+have been used at least once.
[clinic start generated code]*/
static PyObject *
_ssl__SSLContext_cert_store_stats_impl(PySSLContext *self)
-/*[clinic end generated code: output=5f356f4d9cca874d input=d13c6e3f2b48539b]*/
+/*[clinic end generated code: output=5f356f4d9cca874d input=9e5094e094b892a3]*/
{
X509_STORE *store;
STACK_OF(X509_OBJECT) *objs;
Returns a list of dicts with information of loaded CA certs.
-If the optional argument is True, returns a DER-encoded copy of the CA
-certificate.
+If the optional argument is True, returns a DER-encoded copy of the
+CA certificate.
-NOTE: Certificates in a capath directory aren't loaded unless they have
-been used at least once.
+NOTE: Certificates in a capath directory aren't loaded unless they
+have been used at least once.
[clinic start generated code]*/
static PyObject *
_ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form)
-/*[clinic end generated code: output=0d58f148f37e2938 input=eb0592909c9ad6e7]*/
+/*[clinic end generated code: output=0d58f148f37e2938 input=9f71af5aa4e67076]*/
{
X509_STORE *store;
STACK_OF(X509_OBJECT) *objs;
Returns True if the OpenSSL PRNG has been seeded with enough data and False if not.
-It is necessary to seed the PRNG with RAND_add() on some platforms before
-using the ssl() function.
+It is necessary to seed the PRNG with RAND_add() on some platforms
+before using the ssl() function.
[clinic start generated code]*/
static PyObject *
_ssl_RAND_status_impl(PyObject *module)
-/*[clinic end generated code: output=7e0aaa2d39fdc1ad input=aba24a3f3af3b184]*/
+/*[clinic end generated code: output=7e0aaa2d39fdc1ad input=52b061f4a24ff3a1]*/
{
return PyBool_FromLong(RAND_status());
}
Retrieve certificates from Windows' cert store.
-store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide
-more cert storages, too. The function returns a list of (bytes,
-encoding_type, trust) tuples. The encoding_type flag can be interpreted
-with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either
-a set of OIDs or the boolean True.
+store_name may be one of 'CA', 'ROOT' or 'MY'. The system may
+provide more cert storages, too. The function returns a list of
+(bytes, encoding_type, trust) tuples. The encoding_type flag can be
+interpreted with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The
+trust setting is either a set of OIDs or the boolean True.
[clinic start generated code]*/
static PyObject *
_ssl_enum_certificates_impl(PyObject *module, const char *store_name)
-/*[clinic end generated code: output=5134dc8bb3a3c893 input=263c22e6c6988cf3]*/
+/*[clinic end generated code: output=5134dc8bb3a3c893 input=ef81b4bd1b7ab8e9]*/
{
HCERTSTORE hCollectionStore = NULL;
PCCERT_CONTEXT pCertCtx = NULL;
}
/*[clinic input]
+@permit_long_summary
unpack
format as s_object: cache_struct
static PyObject *
unpack_impl(PyObject *module, PyStructObject *s_object, Py_buffer *buffer)
-/*[clinic end generated code: output=48ddd4d88eca8551 input=7df28c5d0b5b6f4e]*/
+/*[clinic end generated code: output=48ddd4d88eca8551 input=53a60a65830bd1e1]*/
{
return Struct_unpack_impl(s_object, buffer);
}
/*[clinic input]
+@permit_long_summary
unpack_from
format as s_object: cache_struct
static PyObject *
unpack_from_impl(PyObject *module, PyStructObject *s_object,
Py_buffer *buffer, Py_ssize_t offset)
-/*[clinic end generated code: output=1042631674c6e0d3 input=599262b23559f6c5]*/
+/*[clinic end generated code: output=1042631674c6e0d3 input=3e46619756fb0293]*/
{
return Struct_unpack_from_impl(s_object, buffer, offset);
}
"\n"
"Test the PyLong_As{Size,Ssize}_t API.\n"
"\n"
-"At present this just tests that non-integer arguments are handled correctly.\n"
-"It should be extended to test overflow handling.");
+"At present this just tests that non-integer arguments are handled\n"
+"correctly. It should be extended to test overflow handling.");
#define _TESTLIMITEDCAPI_TEST_LONG_AS_SIZE_T_METHODDEF \
{"test_long_as_size_t", (PyCFunction)_testlimitedcapi_test_long_as_size_t, METH_NOARGS, _testlimitedcapi_test_long_as_size_t__doc__},
#define _TESTLIMITEDCAPI_PYLONG_ASINT_METHODDEF \
{"PyLong_AsInt", (PyCFunction)_testlimitedcapi_PyLong_AsInt, METH_O, _testlimitedcapi_PyLong_AsInt__doc__},
-/*[clinic end generated code: output=bc52b73c599f96c2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fb5c95bd0a4bdad8 input=a9049054013a1b77]*/
Test the PyLong_As{Size,Ssize}_t API.
-At present this just tests that non-integer arguments are handled correctly.
-It should be extended to test overflow handling.
+At present this just tests that non-integer arguments are handled
+correctly. It should be extended to test overflow handling.
[clinic start generated code]*/
static PyObject *
_testlimitedcapi_test_long_as_size_t_impl(PyObject *module)
-/*[clinic end generated code: output=297a9f14a42f55af input=8923d8f2038c46f4]*/
+/*[clinic end generated code: output=297a9f14a42f55af input=692e73744b35bf6e]*/
{
size_t out_u;
Py_ssize_t out_s;
Return the module of the defining class.
-Also tests that result of PyType_GetModuleByDef matches defining_class's
-module.
+Also tests that result of PyType_GetModuleByDef matches
+defining_class's module.
[clinic start generated code]*/
static PyObject *
_testmultiphase_StateAccessType_get_defining_module_impl(StateAccessTypeObject *self,
PyTypeObject *cls)
-/*[clinic end generated code: output=ba2a14284a5d0921 input=d2c7245c8a9d06f8]*/
+/*[clinic end generated code: output=ba2a14284a5d0921 input=903e7f66555d65ae]*/
{
PyObject *retval;
retval = PyType_GetModule(cls);
Lock the lock.
-Without argument, this blocks if the lock is already
-locked (even by the same thread), waiting for another thread to release
+Without argument, this blocks if the lock is already locked
+(even by the same thread), waiting for another thread to release
the lock, and return True once the lock is acquired.
With an argument, this will only block if the argument is true,
and the return value reflects whether the lock is acquired.
static PyObject *
_thread_lock_acquire_impl(lockobject *self, int blocking,
PyObject *timeoutobj)
-/*[clinic end generated code: output=569d6b25d508bf6f input=13e999649bc1c798]*/
+/*[clinic end generated code: output=569d6b25d508bf6f input=73e75b3d2ec32677]*/
{
PyTime_t timeout;
Release the lock.
-Allows another thread that is blocked waiting for
-the lock to acquire the lock. The lock must be in the locked state,
+Allows another thread that is blocked waiting for the lock
+to acquire the lock. The lock must be in the locked state,
and must be locked by the same thread that unlocks it; otherwise a
`RuntimeError` is raised.
-Do note that if the lock was acquire()d several times in a row by the
-current thread, release() needs to be called as many times for the lock
-to be available for other threads.
+Do note that if the lock was acquire()d several times in a row by
+the current thread, release() needs to be called as many times for
+the lock to be available for other threads.
[clinic start generated code]*/
static PyObject *
_thread_RLock_release_impl(rlockobject *self)
-/*[clinic end generated code: output=51f4a013c5fae2c5 input=d425daf1a5782e63]*/
+/*[clinic end generated code: output=51f4a013c5fae2c5 input=7c188f60189be13a]*/
{
if (_PyRecursiveMutex_TryUnlock(&self->lock) < 0) {
PyErr_SetString(PyExc_RuntimeError,
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
_tkinter.setbusywaitinterval
new_val: int
Set the busy-wait interval in milliseconds between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.
-It should be set to a divisor of the maximum time between frames in an animation.
+It should be set to a divisor of the maximum time between frames in
+an animation.
[clinic start generated code]*/
static PyObject *
_tkinter_setbusywaitinterval_impl(PyObject *module, int new_val)
-/*[clinic end generated code: output=42bf7757dc2d0ab6 input=07b82a04b56625e1]*/
+/*[clinic end generated code: output=42bf7757dc2d0ab6 input=0360dd95c8bd8619]*/
{
if (new_val < 0) {
PyErr_SetString(PyExc_ValueError,
/*[clinic input]
+@permit_long_summary
_tracemalloc.is_tracing
Return True if the tracemalloc module is tracing Python memory allocations.
static PyObject *
_tracemalloc_is_tracing_impl(PyObject *module)
-/*[clinic end generated code: output=2d763b42601cd3ef input=af104b0a00192f63]*/
+/*[clinic end generated code: output=2d763b42601cd3ef input=cac4fc9096babeac]*/
{
return PyBool_FromLong(_PyTraceMalloc_IsTracing());
}
/*[clinic input]
+@permit_long_summary
_tracemalloc.get_traced_memory
Get the current size and peak size of memory blocks traced by tracemalloc.
static PyObject *
_tracemalloc_get_traced_memory_impl(PyObject *module)
-/*[clinic end generated code: output=5b167189adb9e782 input=61ddb5478400ff66]*/
+/*[clinic end generated code: output=5b167189adb9e782 input=b06e7a1a4914fc21]*/
{
return _PyTraceMalloc_GetTracedMemory();
}
Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array's contents.
-The length should be multiplied by the itemsize attribute to calculate
-the buffer length in bytes.
+The length should be multiplied by the itemsize attribute to
+calculate the buffer length in bytes.
[clinic start generated code]*/
static PyObject *
array_array_buffer_info_impl(arrayobject *self)
-/*[clinic end generated code: output=9b2a4ec3ae7e98e7 input=63d9ad83ba60cda8]*/
+/*[clinic end generated code: output=9b2a4ec3ae7e98e7 input=c2771b9f6a8e1c86]*/
{
PyObject* item1 = PyLong_FromVoidPtr(self->ob_item);
if (item1 == NULL) {
}
/*[clinic input]
-@permit_long_docstring_body
array.array.byteswap
Byteswap all items of the array.
-If the items in the array are not 1, 2, 4, 8 or 16 bytes in size, RuntimeError
-is raised. Note, that for complex types the order of
+If the items in the array are not 1, 2, 4, 8 or 16 bytes in size,
+RuntimeError is raised. Note, that for complex types the order of
components (the real part, followed by imaginary part) is preserved.
[clinic start generated code]*/
static PyObject *
array_array_byteswap_impl(arrayobject *self)
-/*[clinic end generated code: output=5f8236cbdf0d90b5 input=aafda275f48191d0]*/
+/*[clinic end generated code: output=5f8236cbdf0d90b5 input=8732f800e1b47bac]*/
{
char *p;
Py_ssize_t i;
}
/*[clinic input]
-@permit_long_docstring_body
array.array.fromunicode
ustr: unicode
Extends this array with data from the unicode string ustr.
-The array must be a unicode type array; otherwise a ValueError is raised.
-Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of
-some other type.
+The array must be a unicode type array; otherwise a ValueError is
+raised. Use array.frombytes(ustr.encode(...)) to append Unicode
+data to an array of some other type.
[clinic start generated code]*/
static PyObject *
array_array_fromunicode_impl(arrayobject *self, PyObject *ustr)
-/*[clinic end generated code: output=24359f5e001a7f2b input=158d47c302f27ca1]*/
+/*[clinic end generated code: output=24359f5e001a7f2b input=01fa592ec7b948b6]*/
{
const char *typecode = self->ob_descr->typecode;
if (strcmp(typecode, "u") != 0 && strcmp(typecode, "w") != 0) {
}
/*[clinic input]
-@permit_long_docstring_body
array.array.tounicode
Extends this array with data from the unicode string ustr.
-Convert the array to a unicode string. The array must be a unicode type array;
-otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a
-unicode string from an array of some other type.
+Convert the array to a unicode string. The array must be a unicode
+type array; otherwise a ValueError is raised. Use
+array.tobytes().decode() to obtain a unicode string from an array of
+some other type.
[clinic start generated code]*/
static PyObject *
array_array_tounicode_impl(arrayobject *self)
-/*[clinic end generated code: output=08e442378336e1ef input=6690997213d219db]*/
+/*[clinic end generated code: output=08e442378336e1ef input=d4d5f398aa71a2be]*/
{
const char *typecode = self->ob_descr->typecode;
if (strcmp(typecode, "u") != 0 && strcmp(typecode, "w") != 0) {
"\n"
"Return an encoded string version of \'input\'.\n"
"\n"
-"\'errors\' may be given to set a different error handling scheme. Default is\n"
-"\'strict\' meaning that encoding errors raise a UnicodeEncodeError. Other possible\n"
-"values are \'ignore\', \'replace\' and \'xmlcharrefreplace\' as well as any other name\n"
-"registered with codecs.register_error that can handle UnicodeEncodeErrors.");
+"\'errors\' may be given to set a different error handling scheme.\n"
+"Default is \'strict\' meaning that encoding errors raise\n"
+"a UnicodeEncodeError. Other possible values are \'ignore\', \'replace\'\n"
+"and \'xmlcharrefreplace\' as well as any other name registered with\n"
+"codecs.register_error that can handle UnicodeEncodeErrors.");
#define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
{"encode", _PyCFunction_CAST(_multibytecodec_MultibyteCodec_encode), METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
"\n"
"Decodes \'input\'.\n"
"\n"
-"\'errors\' may be given to set a different error handling scheme. Default is\n"
-"\'strict\' meaning that encoding errors raise a UnicodeDecodeError. Other possible\n"
-"values are \'ignore\' and \'replace\' as well as any other name registered with\n"
+"\'errors\' may be given to set a different error handling scheme.\n"
+"Default is \'strict\' meaning that encoding errors raise\n"
+"a UnicodeDecodeError. Other possible values are \'ignore\' and\n"
+"\'replace\' as well as any other name registered with\n"
"codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
#define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=014f4f6bb9d29594 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a84b1544d7d01abb input=a9049054013a1b77]*/
}
/*[clinic input]
-@permit_long_docstring_body
_multibytecodec.MultibyteCodec.encode
input: object
Return an encoded string version of 'input'.
-'errors' may be given to set a different error handling scheme. Default is
-'strict' meaning that encoding errors raise a UnicodeEncodeError. Other possible
-values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name
-registered with codecs.register_error that can handle UnicodeEncodeErrors.
+'errors' may be given to set a different error handling scheme.
+Default is 'strict' meaning that encoding errors raise
+a UnicodeEncodeError. Other possible values are 'ignore', 'replace'
+and 'xmlcharrefreplace' as well as any other name registered with
+codecs.register_error that can handle UnicodeEncodeErrors.
[clinic start generated code]*/
static PyObject *
_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
PyObject *input,
const char *errors)
-/*[clinic end generated code: output=7b26652045ba56a9 input=0980aede2c564df8]*/
+/*[clinic end generated code: output=7b26652045ba56a9 input=980002ed1447697b]*/
{
MultibyteCodec_State state;
PyObject *errorcb, *r, *ucvt;
}
/*[clinic input]
-@permit_long_docstring_body
_multibytecodec.MultibyteCodec.decode
input: Py_buffer
Decodes 'input'.
-'errors' may be given to set a different error handling scheme. Default is
-'strict' meaning that encoding errors raise a UnicodeDecodeError. Other possible
-values are 'ignore' and 'replace' as well as any other name registered with
+'errors' may be given to set a different error handling scheme.
+Default is 'strict' meaning that encoding errors raise
+a UnicodeDecodeError. Other possible values are 'ignore' and
+'replace' as well as any other name registered with
codecs.register_error that is able to handle UnicodeDecodeErrors."
[clinic start generated code]*/
_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
Py_buffer *input,
const char *errors)
-/*[clinic end generated code: output=ff419f65bad6cc77 input=2c657ef914600c7c]*/
+/*[clinic end generated code: output=ff419f65bad6cc77 input=dbf93d8bb98ca440]*/
{
MultibyteCodec_State state;
MultibyteDecodeBuffer buf;
"\n"
"Returns the current ABC cache token.\n"
"\n"
-"The token is an opaque object (supporting equality testing) identifying the\n"
-"current version of the ABC cache for virtual subclasses. The token changes\n"
-"with every call to register() on any ABC.");
+"The token is an opaque object (supporting equality testing) identifying\n"
+"the current version of the ABC cache for virtual subclasses. The token\n"
+"changes with every call to register() on any ABC.");
#define _ABC_GET_CACHE_TOKEN_METHODDEF \
{"get_cache_token", (PyCFunction)_abc_get_cache_token, METH_NOARGS, _abc_get_cache_token__doc__},
{
return _abc_get_cache_token_impl(module);
}
-/*[clinic end generated code: output=1989b6716c950e17 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b05d599656aeb1e1 input=a9049054013a1b77]*/
"\n"
"If the future has been cancelled, raises CancelledError. If the\n"
"future\'s result isn\'t yet available, raises InvalidStateError. If\n"
-"the future is done and has an exception set, this exception is raised.");
+"the future is done and has an exception set, this exception is\n"
+"raised.");
#define _ASYNCIO_FUTURE_RESULT_METHODDEF \
{"result", (PyCFunction)_asyncio_Future_result, METH_NOARGS, _asyncio_Future_result__doc__},
"\n"
"Add a callback to be run when the future becomes done.\n"
"\n"
-"The callback is called with a single argument - the future object. If\n"
-"the future is already done when this is called, the callback is\n"
+"The callback is called with a single argument - the future object.\n"
+"If the future is already done when this is called, the callback is\n"
"scheduled with call_soon.");
#define _ASYNCIO_FUTURE_ADD_DONE_CALLBACK_METHODDEF \
"\n"
"Cancel the future and schedule callbacks.\n"
"\n"
-"If the future is already done or cancelled, return False. Otherwise,\n"
-"change the future\'s state to cancelled, schedule the callbacks and\n"
-"return True.");
+"If the future is already done or cancelled, return False.\n"
+"Otherwise, change the future\'s state to cancelled, schedule the\n"
+"callbacks and return True.");
#define _ASYNCIO_FUTURE_CANCEL_METHODDEF \
{"cancel", _PyCFunction_CAST(_asyncio_Future_cancel), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _asyncio_Future_cancel__doc__},
"\n"
"Return True if the future is done.\n"
"\n"
-"Done means either that a result / exception are available, or that the\n"
-"future was cancelled.");
+"Done means either that a result / exception are available, or that\n"
+"the future was cancelled.");
#define _ASYNCIO_FUTURE_DONE_METHODDEF \
{"done", (PyCFunction)_asyncio_Future_done, METH_NOARGS, _asyncio_Future_done__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=b69948ed810591d9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=32996fb47c48245b input=a9049054013a1b77]*/
"Return the index where to insert item x in list a, assuming a is sorted.\n"
"\n"
"The return value i is such that all e in a[:i] have e <= x, and all e in\n"
-"a[i:] have e > x. So if x already appears in the list, a.insert(i, x) will\n"
-"insert just after the rightmost x already there.\n"
+"a[i:] have e > x. So if x already appears in the list, a.insert(i, x)\n"
+"will insert just after the rightmost x already there.\n"
"\n"
"Optional args lo (default 0) and hi (default len(a)) bound the\n"
"slice of a to be searched.\n"
"Return the index where to insert item x in list a, assuming a is sorted.\n"
"\n"
"The return value i is such that all e in a[:i] have e < x, and all e in\n"
-"a[i:] have e >= x. So if x already appears in the list, a.insert(i, x) will\n"
-"insert just before the leftmost x already there.\n"
+"a[i:] have e >= x. So if x already appears in the list, a.insert(i, x)\n"
+"will insert just before the leftmost x already there.\n"
"\n"
"Optional args lo (default 0) and hi (default len(a)) bound the\n"
"slice of a to be searched.\n"
exit:
return return_value;
}
-/*[clinic end generated code: output=a3c44ed440dd6d81 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=62345f14c5c01639 input=a9049054013a1b77]*/
"\n"
"Decompress *data*, returning uncompressed data as bytes.\n"
"\n"
-"If *max_length* is nonnegative, returns at most *max_length* bytes of\n"
-"decompressed data. If this limit is reached and further output can be\n"
-"produced, *self.needs_input* will be set to ``False``. In this case, the next\n"
-"call to *decompress()* may provide *data* as b\'\' to obtain more of the output.\n"
+"If *max_length* is nonnegative, returns at most *max_length* bytes\n"
+"of decompressed data. If this limit is reached and further output\n"
+"can be produced, *self.needs_input* will be set to ``False``. In\n"
+"this case, the next call to *decompress()* may provide *data* as b\'\'\n"
+"to obtain more of the output.\n"
"\n"
-"If all of the input data was decompressed and returned (either because this\n"
-"was less than *max_length* bytes, or because *max_length* was negative),\n"
-"*self.needs_input* will be set to True.\n"
+"If all of the input data was decompressed and returned (either\n"
+"because this was less than *max_length* bytes, or because\n"
+"*max_length* was negative), *self.needs_input* will be set to True.\n"
"\n"
-"Attempting to decompress data after the end of stream is reached raises an\n"
-"EOFError. Any data found after the end of the stream is ignored and saved in\n"
-"the unused_data attribute.");
+"Attempting to decompress data after the end of stream is reached\n"
+"raises an EOFError. Any data found after the end of the stream is\n"
+"ignored and saved in the unused_data attribute.");
#define _BZ2_BZ2DECOMPRESSOR_DECOMPRESS_METHODDEF \
{"decompress", _PyCFunction_CAST(_bz2_BZ2Decompressor_decompress), METH_FASTCALL|METH_KEYWORDS, _bz2_BZ2Decompressor_decompress__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=552ac6d4c5a101b7 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1dce5396d592bad7 input=a9049054013a1b77]*/
"\n"
"Register a codec search function.\n"
"\n"
-"Search functions are expected to take one argument, the encoding name in\n"
-"all lower case letters, and either return None, or a tuple of functions\n"
-"(encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).");
+"Search functions are expected to take one argument, the encoding\n"
+"name in all lower case letters, and either return None, or a tuple\n"
+"of functions (encoder, decoder, stream_reader, stream_writer) (or\n"
+"a CodecInfo object).");
#define _CODECS_REGISTER_METHODDEF \
{"register", (PyCFunction)_codecs_register, METH_O, _codecs_register__doc__},
"Encodes obj using the codec registered for encoding.\n"
"\n"
"The default encoding is \'utf-8\'. errors may be given to set a\n"
-"different error handling scheme. Default is \'strict\' meaning that encoding\n"
-"errors raise a ValueError. Other possible values are \'ignore\', \'replace\'\n"
-"and \'backslashreplace\' as well as any other name registered with\n"
-"codecs.register_error that can handle ValueErrors.");
+"different error handling scheme. Default is \'strict\' meaning that\n"
+"encoding errors raise a ValueError. Other possible values are \'ignore\',\n"
+"\'replace\' and \'backslashreplace\' as well as any other name registered\n"
+"with codecs.register_error that can handle ValueErrors.");
#define _CODECS_ENCODE_METHODDEF \
{"encode", _PyCFunction_CAST(_codecs_encode), METH_FASTCALL|METH_KEYWORDS, _codecs_encode__doc__},
"Decodes obj using the codec registered for encoding.\n"
"\n"
"Default encoding is \'utf-8\'. errors may be given to set a\n"
-"different error handling scheme. Default is \'strict\' meaning that encoding\n"
-"errors raise a ValueError. Other possible values are \'ignore\', \'replace\'\n"
-"and \'backslashreplace\' as well as any other name registered with\n"
-"codecs.register_error that can handle ValueErrors.");
+"different error handling scheme. Default is \'strict\' meaning that\n"
+"encoding errors raise a ValueError. Other possible values are \'ignore\',\n"
+"\'replace\' and \'backslashreplace\' as well as any other name registered\n"
+"with codecs.register_error that can handle ValueErrors.");
#define _CODECS_DECODE_METHODDEF \
{"decode", _PyCFunction_CAST(_codecs_decode), METH_FASTCALL|METH_KEYWORDS, _codecs_decode__doc__},
"Register the specified error handler under the name errors.\n"
"\n"
"handler must be a callable object, that will be called with an exception\n"
-"instance containing information about the location of the encoding/decoding\n"
-"error and must return a (replacement, new position) tuple.");
+"instance containing information about the location of the\n"
+"encoding/decoding error and must return a (replacement, new position)\n"
+"tuple.");
#define _CODECS_REGISTER_ERROR_METHODDEF \
{"register_error", _PyCFunction_CAST(_codecs_register_error), METH_FASTCALL, _codecs_register_error__doc__},
"\n"
"lookup_error(errors) -> handler\n"
"\n"
-"Return the error handler for the specified error handling name or raise a\n"
-"LookupError, if no handler exists under this name.");
+"Return the error handler for the specified error handling name or raise\n"
+"a LookupError, if no handler exists under this name.");
#define _CODECS_LOOKUP_ERROR_METHODDEF \
{"lookup_error", (PyCFunction)_codecs_lookup_error, METH_O, _codecs_lookup_error__doc__},
#ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF
#define _CODECS_CODE_PAGE_ENCODE_METHODDEF
#endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */
-/*[clinic end generated code: output=a968c493bb28be3e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=505edef891a06329 input=a9049054013a1b77]*/
"\n"
"Create a date from a POSIX timestamp.\n"
"\n"
-"The timestamp is a number, e.g. created via time.time(), that is interpreted\n"
-"as local time.");
+"The timestamp is a number, e.g. created via time.time(), that is\n"
+"interpreted as local time.");
#define DATETIME_DATE_FROMTIMESTAMP_METHODDEF \
{"fromtimestamp", (PyCFunction)datetime_date_fromtimestamp, METH_O|METH_CLASS, datetime_date_fromtimestamp__doc__},
"\n"
"Return the time formatted according to ISO.\n"
"\n"
-"The full format is \'HH:MM:SS.mmmmmm+zz:zz\'. By default, the fractional\n"
-"part is omitted if self.microsecond == 0.\n"
+"The full format is \'HH:MM:SS.mmmmmm+zz:zz\'. By default, the\n"
+"fractional part is omitted if self.microsecond == 0.\n"
"\n"
"The optional argument timespec specifies the number of additional\n"
"terms of the time to include. Valid options are \'auto\', \'hours\',\n"
"\n"
"Format using strftime().\n"
"\n"
-"The date part of the timestamp passed to underlying strftime should not be used.\n"
+"The date part of the timestamp passed to underlying strftime should\n"
+"not be used.\n"
"\n"
"For a list of supported format codes, see the documentation:\n"
" https://docs.python.org/3/library/datetime.html#format-codes");
"\n"
"A combination of a date and a time.\n"
"\n"
-"The year, month and day arguments are required. tzinfo may be None, or an\n"
-"instance of a tzinfo subclass. The remaining arguments may be ints.");
+"The year, month and day arguments are required. tzinfo may be None, or\n"
+"an instance of a tzinfo subclass. The remaining arguments may be ints.");
static PyObject *
datetime_datetime_impl(PyTypeObject *type, int year, int month, int day,
"\n"
"Create a datetime from a POSIX timestamp.\n"
"\n"
-"The timestamp is a number, e.g. created via time.time(), that is interpreted\n"
-"as local time.");
+"The timestamp is a number, e.g. created via time.time(), that is\n"
+"interpreted as local time.");
#define DATETIME_DATETIME_FROMTIMESTAMP_METHODDEF \
{"fromtimestamp", _PyCFunction_CAST(datetime_datetime_fromtimestamp), METH_FASTCALL|METH_KEYWORDS|METH_CLASS, datetime_datetime_fromtimestamp__doc__},
{
return datetime_datetime___reduce___impl((PyDateTime_DateTime *)self);
}
-/*[clinic end generated code: output=69658acff6a43ac4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8f63509398651723 input=a9049054013a1b77]*/
"\n"
"Return the value for key if present, otherwise default.\n"
"\n"
-"If key is not in the database, it is inserted with default as the value.");
+"If key is not in the database, it is inserted with default as the\n"
+"value.");
#define _DBM_DBM_SETDEFAULT_METHODDEF \
{"setdefault", _PyCFunction_CAST(_dbm_dbm_setdefault), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _dbm_dbm_setdefault__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=279511ea7cda38dd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=677deecf525167a5 input=a9049054013a1b77]*/
"\n"
"Apply a function of two arguments cumulatively to the items of an iterable, from left to right.\n"
"\n"
-"This effectively reduces the iterable to a single value. If initial is present,\n"
-"it is placed before the items of the iterable in the calculation, and serves as\n"
-"a default when the iterable is empty.\n"
+"This effectively reduces the iterable to a single value. If initial is\n"
+"present, it is placed before the items of the iterable in the\n"
+"calculation, and serves as a default when the iterable is empty.\n"
"\n"
"For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])\n"
"calculates ((((1 + 2) + 3) + 4) + 5).");
return return_value;
}
-/*[clinic end generated code: output=ac9e26d0a5a23d40 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6d8fdaeba4b520fa input=a9049054013a1b77]*/
"\n"
"Return the starting key for the traversal.\n"
"\n"
-"It\'s possible to loop over every key in the database using this method\n"
-"and the nextkey() method. The traversal is ordered by GDBM\'s internal\n"
-"hash values, and won\'t be sorted by the key values.");
+"It\'s possible to loop over every key in the database using this\n"
+"method and the nextkey() method. The traversal is ordered by GDBM\'s\n"
+"internal hash values, and won\'t be sorted by the key values.");
#define _GDBM_GDBM_FIRSTKEY_METHODDEF \
{"firstkey", _PyCFunction_CAST(_gdbm_gdbm_firstkey), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _gdbm_gdbm_firstkey__doc__},
"\n"
"Returns the key that follows key in the traversal.\n"
"\n"
-"The following code prints every key in the database db, without having\n"
-"to create a list in memory that contains them all:\n"
+"The following code prints every key in the database db, without\n"
+"having to create a list in memory that contains them all:\n"
"\n"
" k = db.firstkey()\n"
" while k is not None:\n"
"\n"
"If you have carried out a lot of deletions and would like to shrink\n"
"the space used by the GDBM file, this routine will reorganize the\n"
-"database. GDBM will not shorten the length of a database file except\n"
-"by using this reorganization; otherwise, deleted file space will be\n"
-"kept and reused as new (key,value) pairs are added.");
+"database. GDBM will not shorten the length of a database file\n"
+"except by using this reorganization; otherwise, deleted file space\n"
+"will be kept and reused as new (key,value) pairs are added.");
#define _GDBM_GDBM_REORGANIZE_METHODDEF \
{"reorganize", _PyCFunction_CAST(_gdbm_gdbm_reorganize), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _gdbm_gdbm_reorganize__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=8bca34ce9d4493dd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=429b5db24568292e input=a9049054013a1b77]*/
"\n"
"Return hexadecimal digest of the bytes passed to the update() method so far.\n"
"\n"
-"This may be used to exchange the value safely in email or other non-binary\n"
-"environments.");
+"This may be used to exchange the value safely in email or other\n"
+"non-binary environments.");
#define _HASHLIB_HMAC_HEXDIGEST_METHODDEF \
{"hexdigest", (PyCFunction)_hashlib_HMAC_hexdigest, METH_NOARGS, _hashlib_HMAC_hexdigest__doc__},
"Determine the OpenSSL FIPS mode of operation.\n"
"\n"
"For OpenSSL 3.0.0 and newer it returns the state of the default provider\n"
-"in the default OSSL context. It\'s not quite the same as FIPS_mode() but good\n"
-"enough for unittests.\n"
+"in the default OSSL context. It\'s not quite the same as FIPS_mode() but\n"
+"good enough for unittests.\n"
"\n"
"Effectively any non-zero return value indicates FIPS mode;\n"
"values other than 1 may have additional significance.");
#ifndef _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
#define _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
#endif /* !defined(_HASHLIB_OPENSSL_SHAKE_256_METHODDEF) */
-/*[clinic end generated code: output=9ba35fcc33795b1e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=cf405e652a340bb2 input=a9049054013a1b77]*/
"\n"
"Maxheap variant of heappushpop.\n"
"\n"
-"The combined action runs more efficiently than heappush_max() followed by\n"
-"a separate call to heappop_max().");
+"The combined action runs more efficiently than heappush_max()\n"
+"followed by a separate call to heappop_max().");
#define _HEAPQ_HEAPPUSHPOP_MAX_METHODDEF \
{"heappushpop_max", _PyCFunction_CAST(_heapq_heappushpop_max), METH_FASTCALL, _heapq_heappushpop_max__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=e83d50002c29a96d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=21e4f248ef6e83d6 input=a9049054013a1b77]*/
"\n"
"Clear and destroy the queue.\n"
"\n"
-"Afterward attempts to use the queue will behave as though it never existed.");
+"Afterward attempts to use the queue will behave as though it never\n"
+"existed.");
#define _INTERPQUEUES_DESTROY_METHODDEF \
{"destroy", _PyCFunction_CAST(_interpqueues_destroy), METH_FASTCALL|METH_KEYWORDS, _interpqueues_destroy__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=64cea8e1063429b6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7e56e5b0c684d294 input=a9049054013a1b77]*/
"Execute the body of the provided function in the identified interpreter.\n"
"\n"
"Code objects are also supported. In both cases, closures and args\n"
-"are not supported. Methods and other callables are not supported either.\n"
+"are not supported. Methods and other callables are not supported\n"
+"either.\n"
"\n"
"(See _interpreters.exec().)");
"\n"
"Return a snapshot of an exception.\n"
"\n"
-"If \"exc\" is None then the current exception, if any, is used (but not cleared).\n"
-"The returned snapshot is the same as what _interpreters.exec() returns.");
+"If \"exc\" is None then the current exception, if any, is used (but not\n"
+"cleared). The returned snapshot is the same as what\n"
+"_interpreters.exec() returns.");
#define _INTERPRETERS_CAPTURE_EXCEPTION_METHODDEF \
{"capture_exception", _PyCFunction_CAST(_interpreters_capture_exception), METH_FASTCALL|METH_KEYWORDS, _interpreters_capture_exception__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=c80f73761f860f6c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8c3ca09c304378ad input=a9049054013a1b77]*/
"ValueError on attempt to decode an invalid string. If strict is False\n"
"then literal control characters are allowed in the string.\n"
"\n"
-"Returns a tuple of the decoded string and the index of the character in s\n"
-"after the end quote.");
+"Returns a tuple of the decoded string and the index of the character in\n"
+"s after the end quote.");
#define PY_SCANSTRING_METHODDEF \
{"scanstring", _PyCFunction_CAST(py_scanstring), METH_FASTCALL, py_scanstring__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=5bdd16375c95a4d9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ea6e9a271d4ceaf2 input=a9049054013a1b77]*/
"\n"
"Decompress *data*, returning uncompressed data as bytes.\n"
"\n"
-"If *max_length* is nonnegative, returns at most *max_length* bytes of\n"
-"decompressed data. If this limit is reached and further output can be\n"
-"produced, *self.needs_input* will be set to ``False``. In this case, the next\n"
-"call to *decompress()* may provide *data* as b\'\' to obtain more of the output.\n"
+"If *max_length* is nonnegative, returns at most *max_length* bytes\n"
+"of decompressed data. If this limit is reached and further output\n"
+"can be produced, *self.needs_input* will be set to ``False``. In\n"
+"this case, the next call to *decompress()* may provide *data* as b\'\'\n"
+"to obtain more of the output.\n"
"\n"
-"If all of the input data was decompressed and returned (either because this\n"
-"was less than *max_length* bytes, or because *max_length* was negative),\n"
-"*self.needs_input* will be set to True.\n"
+"If all of the input data was decompressed and returned (either\n"
+"because this was less than *max_length* bytes, or because\n"
+"*max_length* was negative), *self.needs_input* will be set to True.\n"
"\n"
-"Attempting to decompress data after the end of stream is reached raises an\n"
-"EOFError. Any data found after the end of the stream is ignored and saved in\n"
-"the unused_data attribute.");
+"Attempting to decompress data after the end of stream is reached\n"
+"raises an EOFError. Any data found after the end of the stream is\n"
+"ignored and saved in the unused_data attribute.");
#define _LZMA_LZMADECOMPRESSOR_DECOMPRESS_METHODDEF \
{"decompress", _PyCFunction_CAST(_lzma_LZMADecompressor_decompress), METH_FASTCALL|METH_KEYWORDS, _lzma_LZMADecompressor_decompress__doc__},
return return_value;
}
-/*[clinic end generated code: output=6386084cb43d2533 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ffc6d673d858048c input=a9049054013a1b77]*/
"\n"
"Spawn a fresh new child process.\n"
"\n"
-"Fork a child process, close parent file descriptors as appropriate in the\n"
-"child and duplicate the few that are needed before calling exec() in the\n"
-"child process.\n"
+"Fork a child process, close parent file descriptors as appropriate in\n"
+"the child and duplicate the few that are needed before calling exec() in\n"
+"the child process.\n"
"\n"
-"If close_fds is True, close file descriptors 3 and higher, except those listed\n"
-"in the sorted tuple pass_fds.\n"
+"If close_fds is True, close file descriptors 3 and higher, except those\n"
+"listed in the sorted tuple pass_fds.\n"
"\n"
-"The preexec_fn, if supplied, will be called immediately before closing file\n"
-"descriptors and exec.\n"
+"The preexec_fn, if supplied, will be called immediately before closing\n"
+"file descriptors and exec.\n"
"\n"
"WARNING: preexec_fn is NOT SAFE if your application uses threads.\n"
" It may trigger infrequent, difficult to debug deadlocks.\n"
exit:
return return_value;
}
-/*[clinic end generated code: output=942bc2748a9c2785 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=138941c284792aa1 input=a9049054013a1b77]*/
"\n"
"Put the item on the queue.\n"
"\n"
-"The optional \'block\' and \'timeout\' arguments are ignored, as this method\n"
-"never blocks. They are provided for compatibility with the Queue class.");
+"The optional \'block\' and \'timeout\' arguments are ignored, as this\n"
+"method never blocks. They are provided for compatibility with the\n"
+"Queue class.");
#define _QUEUE_SIMPLEQUEUE_PUT_METHODDEF \
{"put", _PyCFunction_CAST(_queue_SimpleQueue_put), METH_FASTCALL|METH_KEYWORDS, _queue_SimpleQueue_put__doc__},
"\n"
"Remove and return an item from the queue.\n"
"\n"
-"If optional args \'block\' is true and \'timeout\' is None (the default),\n"
-"block if necessary until an item is available. If \'timeout\' is\n"
-"a non-negative number, it blocks at most \'timeout\' seconds and raises\n"
-"the Empty exception if no item was available within that time.\n"
+"If optional args \'block\' is true and \'timeout\' is None (the\n"
+"default), block if necessary until an item is available. If\n"
+"\'timeout\' is a non-negative number, it blocks at most \'timeout\'\n"
+"seconds and raises the Empty exception if no item was available\n"
+"within that time.\n"
"Otherwise (\'block\' is false), return an item if one is immediately\n"
"available, else raise the Empty exception (\'timeout\' is ignored\n"
"in that case).");
exit:
return return_value;
}
-/*[clinic end generated code: output=4af5d1b1ea31ac7d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8219fe2f2ed5f068 input=a9049054013a1b77]*/
PyDoc_STRVAR(_ssl__SSLSocket_context__doc__,
"This changes the context associated with the SSLSocket.\n"
"\n"
-"This is typically used from within a callback function set by the sni_callback\n"
-"on the SSLContext to change the certificate information associated with the\n"
-"SSLSocket before the cryptographic exchange handshake messages.");
+"This is typically used from within a callback function set by the\n"
+"sni_callback on the SSLContext to change the certificate information\n"
+"associated with the SSLSocket before the cryptographic exchange\n"
+"handshake messages.");
#if defined(_ssl__SSLSocket_context_DOCSTR)
# undef _ssl__SSLSocket_context_DOCSTR
#endif
"\n"
"Write size bytes from offset in the file descriptor fd to the SSL connection.\n"
"\n"
-"This method uses the zero-copy technique and returns the number of bytes\n"
-"written. It should be called only when Kernel TLS is used for sending data in\n"
-"the connection.\n"
+"This method uses the zero-copy technique and returns the number of\n"
+"bytes written. It should be called only when Kernel TLS is used for\n"
+"sending data in the connection.\n"
"\n"
"The meaning of flags is platform dependent.");
"\n"
"Get channel binding data for current connection.\n"
"\n"
-"Raise ValueError if the requested `cb_type` is not supported. Return bytes\n"
-"of the data or None if the data is not available (e.g. before the handshake).\n"
+"Raise ValueError if the requested `cb_type` is not supported.\n"
+"Return bytes of the data or None if the data is not available (e.g.\n"
+"before the handshake).\n"
"Only \'tls-unique\' channel binding data from RFC 5929 is supported.");
#define _SSL__SSLSOCKET_GET_CHANNEL_BINDING_METHODDEF \
PyDoc_STRVAR(_ssl__SSLContext_sni_callback__doc__,
"Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.\n"
"\n"
-"If the argument is None then the callback is disabled. The method is called\n"
-"with the SSLSocket, the server name as a string, and the SSLContext object.\n"
+"If the argument is None then the callback is disabled. The method\n"
+"is called with the SSLSocket, the server name as a string, and the\n"
+"SSLContext object.\n"
"\n"
"See RFC 6066 for details of the SNI extension.");
#if defined(_ssl__SSLContext_sni_callback_DOCSTR)
"\n"
"Returns quantities of loaded X.509 certificates.\n"
"\n"
-"X.509 certificates with a CA extension and certificate revocation lists\n"
-"inside the context\'s cert store.\n"
+"X.509 certificates with a CA extension and certificate revocation\n"
+"lists inside the context\'s cert store.\n"
"\n"
-"NOTE: Certificates in a capath directory aren\'t loaded unless they have\n"
-"been used at least once.");
+"NOTE: Certificates in a capath directory aren\'t loaded unless they\n"
+"have been used at least once.");
#define _SSL__SSLCONTEXT_CERT_STORE_STATS_METHODDEF \
{"cert_store_stats", (PyCFunction)_ssl__SSLContext_cert_store_stats, METH_NOARGS, _ssl__SSLContext_cert_store_stats__doc__},
"\n"
"Returns a list of dicts with information of loaded CA certs.\n"
"\n"
-"If the optional argument is True, returns a DER-encoded copy of the CA\n"
-"certificate.\n"
+"If the optional argument is True, returns a DER-encoded copy of the\n"
+"CA certificate.\n"
"\n"
-"NOTE: Certificates in a capath directory aren\'t loaded unless they have\n"
-"been used at least once.");
+"NOTE: Certificates in a capath directory aren\'t loaded unless they\n"
+"have been used at least once.");
#define _SSL__SSLCONTEXT_GET_CA_CERTS_METHODDEF \
{"get_ca_certs", _PyCFunction_CAST(_ssl__SSLContext_get_ca_certs), METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext_get_ca_certs__doc__},
"\n"
"Returns True if the OpenSSL PRNG has been seeded with enough data and False if not.\n"
"\n"
-"It is necessary to seed the PRNG with RAND_add() on some platforms before\n"
-"using the ssl() function.");
+"It is necessary to seed the PRNG with RAND_add() on some platforms\n"
+"before using the ssl() function.");
#define _SSL_RAND_STATUS_METHODDEF \
{"RAND_status", (PyCFunction)_ssl_RAND_status, METH_NOARGS, _ssl_RAND_status__doc__},
"\n"
"Retrieve certificates from Windows\' cert store.\n"
"\n"
-"store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may provide\n"
-"more cert storages, too. The function returns a list of (bytes,\n"
-"encoding_type, trust) tuples. The encoding_type flag can be interpreted\n"
-"with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either\n"
-"a set of OIDs or the boolean True.");
+"store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may\n"
+"provide more cert storages, too. The function returns a list of\n"
+"(bytes, encoding_type, trust) tuples. The encoding_type flag can be\n"
+"interpreted with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The\n"
+"trust setting is either a set of OIDs or the boolean True.");
#define _SSL_ENUM_CERTIFICATES_METHODDEF \
{"enum_certificates", _PyCFunction_CAST(_ssl_enum_certificates), METH_FASTCALL|METH_KEYWORDS, _ssl_enum_certificates__doc__},
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
-/*[clinic end generated code: output=e29d5ada294f97bb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=aef2e74b706c6106 input=a9049054013a1b77]*/
"\n"
"Return the module of the defining class.\n"
"\n"
-"Also tests that result of PyType_GetModuleByDef matches defining_class\'s\n"
-"module.");
+"Also tests that result of PyType_GetModuleByDef matches\n"
+"defining_class\'s module.");
#define _TESTMULTIPHASE_STATEACCESSTYPE_GET_DEFINING_MODULE_METHODDEF \
{"get_defining_module", _PyCFunction_CAST(_testmultiphase_StateAccessType_get_defining_module), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _testmultiphase_StateAccessType_get_defining_module__doc__},
}
return _testmultiphase_StateAccessType_get_count_impl((StateAccessTypeObject *)self, cls);
}
-/*[clinic end generated code: output=8eed2f14292ec986 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=aff91f6219a7baca input=a9049054013a1b77]*/
"\n"
"Lock the lock.\n"
"\n"
-"Without argument, this blocks if the lock is already\n"
-"locked (even by the same thread), waiting for another thread to release\n"
+"Without argument, this blocks if the lock is already locked\n"
+"(even by the same thread), waiting for another thread to release\n"
"the lock, and return True once the lock is acquired.\n"
"With an argument, this will only block if the argument is true,\n"
"and the return value reflects whether the lock is acquired.\n"
"\n"
"Release the lock.\n"
"\n"
-"Allows another thread that is blocked waiting for\n"
-"the lock to acquire the lock. The lock must be in the locked state,\n"
+"Allows another thread that is blocked waiting for the lock\n"
+"to acquire the lock. The lock must be in the locked state,\n"
"and must be locked by the same thread that unlocks it; otherwise a\n"
"`RuntimeError` is raised.\n"
"\n"
-"Do note that if the lock was acquire()d several times in a row by the\n"
-"current thread, release() needs to be called as many times for the lock\n"
-"to be available for other threads.");
+"Do note that if the lock was acquire()d several times in a row by\n"
+"the current thread, release() needs to be called as many times for\n"
+"the lock to be available for other threads.");
#define _THREAD_RLOCK_RELEASE_METHODDEF \
{"release", (PyCFunction)_thread_RLock_release, METH_NOARGS, _thread_RLock_release__doc__},
#ifndef _THREAD_SET_NAME_METHODDEF
#define _THREAD_SET_NAME_METHODDEF
#endif /* !defined(_THREAD_SET_NAME_METHODDEF) */
-/*[clinic end generated code: output=1255a1520f43f97a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0f1707cbafc0e8f2 input=a9049054013a1b77]*/
"\n"
"Set the busy-wait interval in milliseconds between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.\n"
"\n"
-"It should be set to a divisor of the maximum time between frames in an animation.");
+"It should be set to a divisor of the maximum time between frames in\n"
+"an animation.");
#define _TKINTER_SETBUSYWAITINTERVAL_METHODDEF \
{"setbusywaitinterval", (PyCFunction)_tkinter_setbusywaitinterval, METH_O, _tkinter_setbusywaitinterval__doc__},
#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
-/*[clinic end generated code: output=052c067aa69237be input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c807adb73e305725 input=a9049054013a1b77]*/
"\n"
"Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array\'s contents.\n"
"\n"
-"The length should be multiplied by the itemsize attribute to calculate\n"
-"the buffer length in bytes.");
+"The length should be multiplied by the itemsize attribute to\n"
+"calculate the buffer length in bytes.");
#define ARRAY_ARRAY_BUFFER_INFO_METHODDEF \
{"buffer_info", (PyCFunction)array_array_buffer_info, METH_NOARGS, array_array_buffer_info__doc__},
"\n"
"Byteswap all items of the array.\n"
"\n"
-"If the items in the array are not 1, 2, 4, 8 or 16 bytes in size, RuntimeError\n"
-"is raised. Note, that for complex types the order of\n"
+"If the items in the array are not 1, 2, 4, 8 or 16 bytes in size,\n"
+"RuntimeError is raised. Note, that for complex types the order of\n"
"components (the real part, followed by imaginary part) is preserved.");
#define ARRAY_ARRAY_BYTESWAP_METHODDEF \
"\n"
"Extends this array with data from the unicode string ustr.\n"
"\n"
-"The array must be a unicode type array; otherwise a ValueError is raised.\n"
-"Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of\n"
-"some other type.");
+"The array must be a unicode type array; otherwise a ValueError is\n"
+"raised. Use array.frombytes(ustr.encode(...)) to append Unicode\n"
+"data to an array of some other type.");
#define ARRAY_ARRAY_FROMUNICODE_METHODDEF \
{"fromunicode", (PyCFunction)array_array_fromunicode, METH_O, array_array_fromunicode__doc__},
"\n"
"Extends this array with data from the unicode string ustr.\n"
"\n"
-"Convert the array to a unicode string. The array must be a unicode type array;\n"
-"otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a\n"
-"unicode string from an array of some other type.");
+"Convert the array to a unicode string. The array must be a unicode\n"
+"type array; otherwise a ValueError is raised. Use\n"
+"array.tobytes().decode() to obtain a unicode string from an array of\n"
+"some other type.");
#define ARRAY_ARRAY_TOUNICODE_METHODDEF \
{"tounicode", (PyCFunction)array_array_tounicode, METH_NOARGS, array_array_tounicode__doc__},
return return_value;
}
-/*[clinic end generated code: output=8699475b51151247 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=32784678e77ac658 input=a9049054013a1b77]*/
"\n"
"log(z[, base]) -> the logarithm of z to the given base.\n"
"\n"
-"If the base is not specified, returns the natural logarithm (base e) of z.");
+"If the base is not specified, returns the natural logarithm (base e)\n"
+"of z.");
#define CMATH_LOG_METHODDEF \
{"log", _PyCFunction_CAST(cmath_log), METH_FASTCALL, cmath_log__doc__},
"\n"
"Return True if a is close in value to b, and False otherwise.\n"
"\n"
-"For the values to be considered close, the difference between them must be\n"
-"smaller than at least one of the tolerances.\n"
+"For the values to be considered close, the difference between them must\n"
+"be smaller than at least one of the tolerances.\n"
"\n"
-"-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is\n"
-"not close to anything, even itself. inf and -inf are only close to themselves.");
+"-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is,\n"
+"NaN is not close to anything, even itself. inf and -inf are only close\n"
+"to themselves.");
#define CMATH_ISCLOSE_METHODDEF \
{"isclose", _PyCFunction_CAST(cmath_isclose), METH_FASTCALL|METH_KEYWORDS, cmath_isclose__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=631db17fb1c79d66 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7d5ad4cf258526cd input=a9049054013a1b77]*/
"\n"
"Dump the traceback of all threads in timeout seconds.\n"
"\n"
-"If repeat is true, the tracebacks of all threads are dumped every timeout\n"
-"seconds. If exit is true, call _exit(1) which is not safe. max_threads\n"
-"caps the number of threads dumped.");
+"If repeat is true, the tracebacks of all threads are dumped every\n"
+"timeout seconds. If exit is true, call _exit(1) which is not safe.\n"
+"max_threads caps the number of threads dumped.");
#define FAULTHANDLER_DUMP_TRACEBACK_LATER_METHODDEF \
{"dump_traceback_later", _PyCFunction_CAST(faulthandler_dump_traceback_later), METH_FASTCALL|METH_KEYWORDS, faulthandler_dump_traceback_later__doc__},
#ifndef FAULTHANDLER__RAISE_EXCEPTION_METHODDEF
#define FAULTHANDLER__RAISE_EXCEPTION_METHODDEF
#endif /* !defined(FAULTHANDLER__RAISE_EXCEPTION_METHODDEF) */
-/*[clinic end generated code: output=2452d767c85130a6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=14815a5f8afe813f input=a9049054013a1b77]*/
" generation\n"
" Generation to extract the objects from.\n"
"\n"
-"If generation is not None, return only the objects tracked by the collector\n"
-"that are in that generation.");
+"If generation is not None, return only the objects tracked by the\n"
+"collector that are in that generation.");
#define GC_GET_OBJECTS_METHODDEF \
{"get_objects", _PyCFunction_CAST(gc_get_objects), METH_FASTCALL|METH_KEYWORDS, gc_get_objects__doc__},
"\n"
"Freeze all current tracked objects and ignore them for future collections.\n"
"\n"
-"This can be used before a POSIX fork() call to make the gc copy-on-write friendly.\n"
-"Note: collection before a POSIX fork() call may free pages for future allocation\n"
-"which can cause copy-on-write.");
+"This can be used before a POSIX fork() call to make the gc copy-on-write\n"
+"friendly.\n"
+"Note: collection before a POSIX fork() call may free pages for future\n"
+"allocation which can cause copy-on-write.");
#define GC_FREEZE_METHODDEF \
{"freeze", (PyCFunction)gc_freeze, METH_NOARGS, gc_freeze__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=19738854607938db input=a9049054013a1b77]*/
+/*[clinic end generated code: output=756c0e7719b76971 input=a9049054013a1b77]*/
"\n"
"Return hexadecimal digest of the bytes passed to the update() method so far.\n"
"\n"
-"This may be used to exchange the value safely in email or other non-binary\n"
-"environments.\n"
+"This may be used to exchange the value safely in email or other\n"
+"non-binary environments.\n"
"\n"
"This method may raise a MemoryError.");
exit:
return return_value;
}
-/*[clinic end generated code: output=30c0614482d963f5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6ec5948df1c5569a input=a9049054013a1b77]*/
"\n"
"Return data elements corresponding to true selector elements.\n"
"\n"
-"Forms a shorter iterator from selected data elements using the selectors to\n"
-"choose the data elements.");
+"Forms a shorter iterator from selected data elements using the selectors\n"
+"to choose the data elements.");
static PyObject *
itertools_compress_impl(PyTypeObject *type, PyObject *seq1, PyObject *seq2);
exit:
return return_value;
}
-/*[clinic end generated code: output=7f385837b13edbeb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a34a31f60100e0ff input=a9049054013a1b77]*/
"\n"
"If steps is not specified or is None, it defaults to 1.\n"
"\n"
-"Raises a TypeError, if x or y is not a double, or if steps is not an integer.\n"
-"Raises ValueError if steps is negative.");
+"Raises a TypeError, if x or y is not a double, or if steps is not\n"
+"an integer. Raises ValueError if steps is negative.");
#define MATH_NEXTAFTER_METHODDEF \
{"nextafter", _PyCFunction_CAST(math_nextafter), METH_FASTCALL|METH_KEYWORDS, math_nextafter__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=23b2453ba77453e5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=80c666aef8d2df36 input=a9049054013a1b77]*/
"\n"
"Retrieve result of operation.\n"
"\n"
-"If wait is true then it blocks until the operation is finished. If wait\n"
-"is false and the operation is still pending then an error is raised.");
+"If wait is true then it blocks until the operation is finished. If\n"
+"wait is false and the operation is still pending then an error is\n"
+"raised.");
#define _OVERLAPPED_OVERLAPPED_GETRESULT_METHODDEF \
{"getresult", _PyCFunction_CAST(_overlapped_Overlapped_getresult), METH_FASTCALL, _overlapped_Overlapped_getresult__doc__},
return return_value;
}
-/*[clinic end generated code: output=3e4cb2b55342cd96 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0ecaf45a09539599 input=a9049054013a1b77]*/
"\n"
"Wait until one or more file descriptors are ready for some kind of I/O.\n"
"\n"
-"The first three arguments are iterables of file descriptors to be waited for:\n"
+"The first three arguments are iterables of file descriptors to be waited\n"
+"for:\n"
"rlist -- wait until ready for reading\n"
"wlist -- wait until ready for writing\n"
"xlist -- wait for an \"exceptional condition\"\n"
"a non-integer to specify fractions of seconds. If it is absent\n"
"or None, the call will never time out.\n"
"\n"
-"The return value is a tuple of three lists corresponding to the first three\n"
-"arguments; each contains the subset of the corresponding file descriptors\n"
-"that are ready.\n"
+"The return value is a tuple of three lists corresponding to the first\n"
+"three arguments; each contains the subset of the corresponding file\n"
+"descriptors that are ready.\n"
"\n"
"*** IMPORTANT NOTICE ***\n"
"On Windows, only sockets are supported; on Unix, all file\n"
" The maximum time to wait in milliseconds, or else None (or a negative\n"
" value) to wait indefinitely.\n"
"\n"
-"Returns a list containing any descriptors that have events or errors to\n"
-"report, as a list of (fd, event) 2-tuples.");
+"Returns a list containing any descriptors that have events or errors\n"
+"to report, as a list of (fd, event) 2-tuples.");
#define SELECT_POLL_POLL_METHODDEF \
{"poll", _PyCFunction_CAST(select_poll_poll), METH_FASTCALL, select_poll_poll__doc__},
"Polls the set of registered file descriptors.\n"
"\n"
" timeout\n"
-" The maximum time to wait in milliseconds, or else None (or a negative\n"
-" value) to wait indefinitely.\n"
+" The maximum time to wait in milliseconds, or else None (or\n"
+" a negative value) to wait indefinitely.\n"
"\n"
-"Returns a list containing any descriptors that have events or errors to\n"
-"report, as a list of (fd, event) 2-tuples.");
+"Returns a list containing any descriptors that have events or errors\n"
+"to report, as a list of (fd, event) 2-tuples.");
#define SELECT_DEVPOLL_POLL_METHODDEF \
{"poll", _PyCFunction_CAST(select_devpoll_poll), METH_FASTCALL, select_devpoll_poll__doc__},
"\n"
"Returns a polling object.\n"
"\n"
-"This object supports registering and unregistering file descriptors, and then\n"
-"polling them for I/O events.");
+"This object supports registering and unregistering file descriptors, and\n"
+"then polling them for I/O events.");
#define SELECT_POLL_METHODDEF \
{"poll", (PyCFunction)select_poll, METH_NOARGS, select_poll__doc__},
"\n"
"Returns a polling object.\n"
"\n"
-"This object supports registering and unregistering file descriptors, and then\n"
-"polling them for I/O events.");
+"This object supports registering and unregistering file descriptors, and\n"
+"then polling them for I/O events.");
#define SELECT_DEVPOLL_METHODDEF \
{"devpoll", (PyCFunction)select_devpoll, METH_NOARGS, select_devpoll__doc__},
" maxevents\n"
" the maximum number of events returned; -1 means no limit\n"
"\n"
-"Returns a list containing any descriptors that have events to report,\n"
-"as a list of (fd, events) 2-tuples.");
+"Returns a list containing any descriptors that have events to\n"
+"report, as a list of (fd, events) 2-tuples.");
#define SELECT_EPOLL_POLL_METHODDEF \
{"poll", _PyCFunction_CAST(select_epoll_poll), METH_FASTCALL|METH_KEYWORDS, select_epoll_poll__doc__},
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF
#define SELECT_KQUEUE_CONTROL_METHODDEF
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
-/*[clinic end generated code: output=52e3be5cc66cf1b6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a1ac666294fd14bd input=a9049054013a1b77]*/
"Set the action for the given signal.\n"
"\n"
"The action can be SIG_DFL, SIG_IGN, or a callable Python object.\n"
-"The previous action is returned. See getsignal() for possible return values.\n"
+"The previous action is returned. See getsignal() for possible return\n"
+"values.\n"
"\n"
"*** IMPORTANT NOTICE ***\n"
-"A signal handler function is called with two arguments:\n"
-"the first is the signal number, the second is the interrupted stack frame.");
+"A signal handler function is called with two arguments: the first is\n"
+"the signal number, the second is the interrupted stack frame.");
#define SIGNAL_SIGNAL_METHODDEF \
{"signal", _PyCFunction_CAST(signal_signal), METH_FASTCALL, signal_signal__doc__},
"\n"
"Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF).\n"
"\n"
-"The timer will fire after value seconds and after that every interval seconds.\n"
-"The itimer can be cleared by setting seconds to zero.\n"
+"The timer will fire after value seconds and after that every interval\n"
+"seconds. The itimer can be cleared by setting seconds to zero.\n"
"\n"
"Returns old values as a tuple: (delay, interval).");
"Wait for a signal.\n"
"\n"
"Suspend execution of the calling thread until the delivery of one of the\n"
-"signals specified in the signal set sigset. The function accepts the signal\n"
-"and returns the signal number.");
+"signals specified in the signal set sigset. The function accepts the\n"
+"signal and returns the signal number.");
#define SIGNAL_SIGWAIT_METHODDEF \
{"sigwait", (PyCFunction)signal_sigwait, METH_O, signal_sigwait__doc__},
#ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF
#define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF
#endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */
-/*[clinic end generated code: output=42e20d118435d7fa input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0731d6f05c42c09a input=a9049054013a1b77]*/
"Send a data string to the socket.\n"
"\n"
"For the optional flags argument, see the Unix manual.\n"
-"Return the number of bytes sent; this may be less than len(data) if the network is busy.");
+"Return the number of bytes sent; this may be less than len(data) if\n"
+"the network is busy.");
#define _SOCKET_SOCKET_SEND_METHODDEF \
{"send", _PyCFunction_CAST(_socket_socket_send), METH_FASTCALL, _socket_socket_send__doc__},
"\n"
"For the optional flags argument, see the Unix manual.\n"
"This calls send() repeatedly until all data is sent.\n"
-"If an error occurs, it\'s impossible to tell how much data has been sent.");
+"If an error occurs, it\'s impossible to tell how much data has been\n"
+"sent.");
#define _SOCKET_SOCKET_SENDALL_METHODDEF \
{"sendall", _PyCFunction_CAST(_socket_socket_sendall), METH_FASTCALL, _socket_socket_sendall__doc__},
"data as an iterable of bytes-like objects (e.g. bytes objects).\n"
"The ancdata argument specifies the ancillary data (control messages)\n"
"as an iterable of zero or more tuples (cmsg_level, cmsg_type,\n"
-"cmsg_data), where cmsg_level and cmsg_type are integers specifying the\n"
-"protocol level and protocol-specific type respectively, and cmsg_data\n"
-"is a bytes-like object holding the associated data. The flags\n"
-"argument defaults to 0 and has the same meaning as for send(). If\n"
-"address is supplied and not None, it sets a destination address for\n"
-"the message. The return value is the number of bytes of non-ancillary\n"
-"data sent.");
+"cmsg_data), where cmsg_level and cmsg_type are integers specifying\n"
+"the protocol level and protocol-specific type respectively, and\n"
+"cmsg_data is a bytes-like object holding the associated data. The\n"
+"flags argument defaults to 0 and has the same meaning as for send().\n"
+"If address is supplied and not None, it sets a destination address\n"
+"for the message. The return value is the number of bytes of\n"
+"non-ancillary data sent.");
#define _SOCKET_SOCKET_SENDMSG_METHODDEF \
{"sendmsg", _PyCFunction_CAST(_socket_socket_sendmsg), METH_FASTCALL, _socket_socket_sendmsg__doc__},
#ifndef _SOCKET_IF_INDEXTONAME_METHODDEF
#define _SOCKET_IF_INDEXTONAME_METHODDEF
#endif /* !defined(_SOCKET_IF_INDEXTONAME_METHODDEF) */
-/*[clinic end generated code: output=36051ebf6ad1e6f8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0b1fa78ac6589353 input=a9049054013a1b77]*/
"Set the tty winsize for file descriptor fd.\n"
"\n"
"The winsize to be set is taken from the winsize argument, which\n"
-"is a two-item tuple (ws_row, ws_col) like the one returned by tcgetwinsize().");
+"is a two-item tuple (ws_row, ws_col) like the one returned by\n"
+"tcgetwinsize().");
#define TERMIOS_TCSETWINSIZE_METHODDEF \
{"tcsetwinsize", (PyCFunction)(void(*)(void))termios_tcsetwinsize, METH_FASTCALL, termios_tcsetwinsize__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=c6c6192583b0da36 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d2176c4d9043d3cc input=a9049054013a1b77]*/
" Unconsumed input data will be stored in\n"
" the unconsumed_tail attribute.\n"
"\n"
-"After calling this function, some of the input data may still be stored in\n"
-"internal buffers for later processing.\n"
+"After calling this function, some of the input data may still be\n"
+"stored in internal buffers for later processing.\n"
"Call the flush() method to clear these buffers.");
#define ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
"\n"
"Decompress *data*, returning uncompressed data as bytes.\n"
"\n"
-"If *max_length* is nonnegative, returns at most *max_length* bytes of\n"
-"decompressed data. If this limit is reached and further output can be\n"
-"produced, *self.needs_input* will be set to ``False``. In this case, the next\n"
-"call to *decompress()* may provide *data* as b\'\' to obtain more of the output.\n"
+"If *max_length* is nonnegative, returns at most *max_length* bytes\n"
+"of decompressed data. If this limit is reached and further output\n"
+"can be produced, *self.needs_input* will be set to ``False``. In\n"
+"this case, the next call to *decompress()* may provide *data* as b\'\'\n"
+"to obtain more of the output.\n"
"\n"
-"If all of the input data was decompressed and returned (either because this\n"
-"was less than *max_length* bytes, or because *max_length* was negative),\n"
-"*self.needs_input* will be set to True.\n"
+"If all of the input data was decompressed and returned (either\n"
+"because this was less than *max_length* bytes, or because\n"
+"*max_length* was negative), *self.needs_input* will be set to True.\n"
"\n"
-"Attempting to decompress data after the end of stream is reached raises an\n"
-"EOFError. Any data found after the end of the stream is ignored and saved in\n"
-"the unused_data attribute.");
+"Attempting to decompress data after the end of stream is reached\n"
+"raises an EOFError. Any data found after the end of the stream is\n"
+"ignored and saved in the unused_data attribute.");
#define ZLIB__ZLIBDECOMPRESSOR_DECOMPRESS_METHODDEF \
{"decompress", _PyCFunction_CAST(zlib__ZlibDecompressor_decompress), METH_FASTCALL|METH_KEYWORDS, zlib__ZlibDecompressor_decompress__doc__},
#ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF
#define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF
#endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */
-/*[clinic end generated code: output=13627e14206d3552 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c9a60fe6600a2e4d input=a9049054013a1b77]*/
log(z[, base]) -> the logarithm of z to the given base.
-If the base is not specified, returns the natural logarithm (base e) of z.
+If the base is not specified, returns the natural logarithm (base e)
+of z.
[clinic start generated code]*/
static PyObject *
cmath_log_impl(PyObject *module, Py_complex x, PyObject *y_obj)
-/*[clinic end generated code: output=4effdb7d258e0d94 input=e1f81d4fcfd26497]*/
+/*[clinic end generated code: output=4effdb7d258e0d94 input=eb25de0757baf4a0]*/
{
Py_complex y;
}
/*[clinic input]
-@permit_long_docstring_body
cmath.isclose -> bool
a: Py_complex
Return True if a is close in value to b, and False otherwise.
-For the values to be considered close, the difference between them must be
-smaller than at least one of the tolerances.
+For the values to be considered close, the difference between them must
+be smaller than at least one of the tolerances.
--inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is
-not close to anything, even itself. inf and -inf are only close to themselves.
+-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is,
+NaN is not close to anything, even itself. inf and -inf are only close
+to themselves.
[clinic start generated code]*/
static int
cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
double rel_tol, double abs_tol)
-/*[clinic end generated code: output=8a2486cc6e0014d1 input=0d45feea7c626f47]*/
+/*[clinic end generated code: output=8a2486cc6e0014d1 input=301b56c90d9a79de]*/
{
double diff;
Dump the traceback of all threads in timeout seconds.
-If repeat is true, the tracebacks of all threads are dumped every timeout
-seconds. If exit is true, call _exit(1) which is not safe. max_threads
-caps the number of threads dumped.
+If repeat is true, the tracebacks of all threads are dumped every
+timeout seconds. If exit is true, call _exit(1) which is not safe.
+max_threads caps the number of threads dumped.
[clinic start generated code]*/
static PyObject *
PyObject *timeout_obj, int repeat,
PyObject *file, int exit,
Py_ssize_t max_threads)
-/*[clinic end generated code: output=543a0f3807113394 input=6836555ee157ddb4]*/
+/*[clinic end generated code: output=543a0f3807113394 input=32aaf7437d0928db]*/
{
PyTime_t timeout, timeout_us;
int fd;
Return a list of objects tracked by the collector (excluding the list returned).
-If generation is not None, return only the objects tracked by the collector
-that are in that generation.
+If generation is not None, return only the objects tracked by the
+collector that are in that generation.
[clinic start generated code]*/
static PyObject *
gc_get_objects_impl(PyObject *module, Py_ssize_t generation)
-/*[clinic end generated code: output=48b35fea4ba6cb0e input=a887f1d9924be7cf]*/
+/*[clinic end generated code: output=48b35fea4ba6cb0e input=89bca0d4a64e0135]*/
{
if (PySys_Audit("gc.get_objects", "n", generation) < 0) {
return NULL;
}
/*[clinic input]
-@permit_long_docstring_body
+@permit_long_summary
gc.freeze
Freeze all current tracked objects and ignore them for future collections.
-This can be used before a POSIX fork() call to make the gc copy-on-write friendly.
-Note: collection before a POSIX fork() call may free pages for future allocation
-which can cause copy-on-write.
+This can be used before a POSIX fork() call to make the gc copy-on-write
+friendly.
+Note: collection before a POSIX fork() call may free pages for future
+allocation which can cause copy-on-write.
[clinic start generated code]*/
static PyObject *
gc_freeze_impl(PyObject *module)
-/*[clinic end generated code: output=502159d9cdc4c139 input=11fb59b0a75dcf3d]*/
+/*[clinic end generated code: output=502159d9cdc4c139 input=02674706fc9c0de6]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
_PyGC_Freeze(interp);
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
_hmac.HMAC.hexdigest
Return hexadecimal digest of the bytes passed to the update() method so far.
-This may be used to exchange the value safely in email or other non-binary
-environments.
+This may be used to exchange the value safely in email or other
+non-binary environments.
This method may raise a MemoryError.
[clinic start generated code]*/
static PyObject *
_hmac_HMAC_hexdigest_impl(HMACObject *self)
-/*[clinic end generated code: output=6659807a09ae14ec input=6e0e796e38d82fc8]*/
+/*[clinic end generated code: output=6659807a09ae14ec input=9097dce732ed808f]*/
{
assert(self->digest_size <= Py_hmac_hash_max_digest_size);
uint8_t digest[Py_hmac_hash_max_digest_size];
#define batchedobject_CAST(op) ((batchedobject *)(op))
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.batched.__new__ as batched_new
iterable: object
static PyObject *
batched_new_impl(PyTypeObject *type, PyObject *iterable, Py_ssize_t n,
int strict)
-/*[clinic end generated code: output=c6de11b061529d3e input=7814b47e222f5467]*/
+/*[clinic end generated code: output=c6de11b061529d3e input=b31d8be8e8577a34]*/
{
PyObject *it;
batchedobject *bo;
static PyObject *_grouper_create(groupbyobject *, PyObject *);
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.groupby.__new__
static PyObject *
itertools_groupby_impl(PyTypeObject *type, PyObject *it, PyObject *keyfunc)
-/*[clinic end generated code: output=cbb1ae3a90fd4141 input=6b3d123e87ff65a1]*/
+/*[clinic end generated code: output=cbb1ae3a90fd4141 input=9f89fe625b20ef1a]*/
{
groupbyobject *gbo;
selectors as seq2: object
Return data elements corresponding to true selector elements.
-Forms a shorter iterator from selected data elements using the selectors to
-choose the data elements.
+Forms a shorter iterator from selected data elements using the selectors
+to choose the data elements.
[clinic start generated code]*/
static PyObject *
itertools_compress_impl(PyTypeObject *type, PyObject *seq1, PyObject *seq2)
-/*[clinic end generated code: output=7e67157212ed09e0 input=79596d7cd20c77e5]*/
+/*[clinic end generated code: output=7e67157212ed09e0 input=32ca4347dbc46749]*/
{
PyObject *data=NULL, *selectors=NULL;
compressobject *lz;
*/
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.count.__new__
start as long_cnt: object(c_default="NULL") = 0
static PyObject *
itertools_count_impl(PyTypeObject *type, PyObject *long_cnt,
PyObject *long_step)
-/*[clinic end generated code: output=09a9250aebd00b1c input=d7a85eec18bfcd94]*/
+/*[clinic end generated code: output=09a9250aebd00b1c input=91e4b12c0e88b9f4]*/
{
countobject *lz;
int fast_mode;
/*[clinic input]
+@permit_long_summary
math.isinf
x: double
static PyObject *
math_isinf_impl(PyObject *module, double x)
-/*[clinic end generated code: output=9f00cbec4de7b06b input=32630e4212cf961f]*/
+/*[clinic end generated code: output=9f00cbec4de7b06b input=8584152a71a3aea9]*/
{
return PyBool_FromLong((long)isinf(x));
}
/*[clinic input]
-@permit_long_docstring_body
+@permit_long_summary
math.nextafter
x: double
If steps is not specified or is None, it defaults to 1.
-Raises a TypeError, if x or y is not a double, or if steps is not an integer.
-Raises ValueError if steps is negative.
+Raises a TypeError, if x or y is not a double, or if steps is not
+an integer. Raises ValueError if steps is negative.
[clinic start generated code]*/
static PyObject *
math_nextafter_impl(PyObject *module, double x, double y, PyObject *steps)
-/*[clinic end generated code: output=cc6511f02afc099e input=cc8f0dad1b27a8a4]*/
+/*[clinic end generated code: output=cc6511f02afc099e input=3a9151e6b1e9f346]*/
{
#if defined(_AIX)
if (x == y) {
Retrieve result of operation.
-If wait is true then it blocks until the operation is finished. If wait
-is false and the operation is still pending then an error is raised.
+If wait is true then it blocks until the operation is finished. If
+wait is false and the operation is still pending then an error is
+raised.
[clinic start generated code]*/
static PyObject *
_overlapped_Overlapped_getresult_impl(OverlappedObject *self, BOOL wait)
-/*[clinic end generated code: output=8c9bd04d08994f6c input=aa5b03e9897ca074]*/
+/*[clinic end generated code: output=8c9bd04d08994f6c input=852fbd817cbd2b3d]*/
{
DWORD transferred = 0;
BOOL ret;
/* Set history length */
/*[clinic input]
+@permit_long_summary
readline.set_history_length
length: int
static PyObject *
readline_set_history_length_impl(PyObject *module, int length)
-/*[clinic end generated code: output=e161a53e45987dc7 input=b8901bf16488b760]*/
+/*[clinic end generated code: output=e161a53e45987dc7 input=8d02c81b38ef81ec]*/
{
FT_ATOMIC_STORE_INT_RELAXED(_history_length, length);
Py_RETURN_NONE;
/* Get history length */
/*[clinic input]
+@permit_long_summary
readline.get_history_length
Return the maximum number of lines that will be written to the history file.
static PyObject *
readline_get_history_length_impl(PyObject *module)
-/*[clinic end generated code: output=83a2eeae35b6d2b9 input=5dce2eeba4327817]*/
+/*[clinic end generated code: output=83a2eeae35b6d2b9 input=a65823e732ebfa9d]*/
{
int history_length = FT_ATOMIC_LOAD_INT_RELAXED(_history_length);
return PyLong_FromLong(history_length);
#endif /* FD_SETSIZE > 1024 */
/*[clinic input]
-@permit_long_docstring_body
select.select
rlist: object
Wait until one or more file descriptors are ready for some kind of I/O.
-The first three arguments are iterables of file descriptors to be waited for:
+The first three arguments are iterables of file descriptors to be waited
+for:
rlist -- wait until ready for reading
wlist -- wait until ready for writing
xlist -- wait for an "exceptional condition"
a non-integer to specify fractions of seconds. If it is absent
or None, the call will never time out.
-The return value is a tuple of three lists corresponding to the first three
-arguments; each contains the subset of the corresponding file descriptors
-that are ready.
+The return value is a tuple of three lists corresponding to the first
+three arguments; each contains the subset of the corresponding file
+descriptors that are ready.
*** IMPORTANT NOTICE ***
On Windows, only sockets are supported; on Unix, all file
static PyObject *
select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist,
PyObject *xlist, PyObject *timeout_obj)
-/*[clinic end generated code: output=2b3cfa824f7ae4cf input=b0403de75cd11cc1]*/
+/*[clinic end generated code: output=2b3cfa824f7ae4cf input=cc93e9bb9ffacbaf]*/
{
#ifdef SELECT_USES_HEAP
pylist *rfd2obj, *wfd2obj, *efd2obj;
Polls the set of registered file descriptors.
-Returns a list containing any descriptors that have events or errors to
-report, as a list of (fd, event) 2-tuples.
+Returns a list containing any descriptors that have events or errors
+to report, as a list of (fd, event) 2-tuples.
[clinic start generated code]*/
static PyObject *
select_poll_poll_impl(pollObject *self, PyObject *timeout_obj)
-/*[clinic end generated code: output=876e837d193ed7e4 input=54310631457efdec]*/
+/*[clinic end generated code: output=876e837d193ed7e4 input=e0a9c0aa283de8c8]*/
{
PyObject *result_list = NULL;
int poll_result, i, j;
@critical_section
select.devpoll.poll
timeout as timeout_obj: object = None
- The maximum time to wait in milliseconds, or else None (or a negative
- value) to wait indefinitely.
+ The maximum time to wait in milliseconds, or else None (or
+ a negative value) to wait indefinitely.
/
Polls the set of registered file descriptors.
-Returns a list containing any descriptors that have events or errors to
-report, as a list of (fd, event) 2-tuples.
+Returns a list containing any descriptors that have events or errors
+to report, as a list of (fd, event) 2-tuples.
[clinic start generated code]*/
static PyObject *
select_devpoll_poll_impl(devpollObject *self, PyObject *timeout_obj)
-/*[clinic end generated code: output=2654e5457cca0b3c input=fe7a3f6dcbc118c5]*/
+/*[clinic end generated code: output=2654e5457cca0b3c input=9e1672658d728539]*/
{
struct dvpoll dvp;
PyObject *result_list = NULL;
/*[clinic input]
-@permit_long_docstring_body
select.poll
Returns a polling object.
-This object supports registering and unregistering file descriptors, and then
-polling them for I/O events.
+This object supports registering and unregistering file descriptors, and
+then polling them for I/O events.
[clinic start generated code]*/
static PyObject *
select_poll_impl(PyObject *module)
-/*[clinic end generated code: output=16a665a4e1d228c5 input=5e07eea8ad564e7f]*/
+/*[clinic end generated code: output=16a665a4e1d228c5 input=0aefd4527e99e0aa]*/
{
return (PyObject *)newPollObject(module);
}
#ifdef HAVE_SYS_DEVPOLL_H
/*[clinic input]
-@permit_long_docstring_body
select.devpoll
Returns a polling object.
-This object supports registering and unregistering file descriptors, and then
-polling them for I/O events.
+This object supports registering and unregistering file descriptors, and
+then polling them for I/O events.
[clinic start generated code]*/
static PyObject *
select_devpoll_impl(PyObject *module)
-/*[clinic end generated code: output=ea9213cc87fd9581 input=048506faef19d947]*/
+/*[clinic end generated code: output=ea9213cc87fd9581 input=4c2ac27d10248526]*/
{
return (PyObject *)newDevPollObject(module);
}
}
/*[clinic input]
+@permit_long_summary
select.epoll.register
fd: fildes
static PyObject *
select_epoll_register_impl(pyEpoll_Object *self, int fd,
unsigned int eventmask)
-/*[clinic end generated code: output=318e5e6386520599 input=a5071b71edfe3578]*/
+/*[clinic end generated code: output=318e5e6386520599 input=9f0c9ebb25a4fc8f]*/
{
return pyepoll_internal_ctl(self->epfd, EPOLL_CTL_ADD, fd, eventmask);
}
Wait for events on the epoll file descriptor.
-Returns a list containing any descriptors that have events to report,
-as a list of (fd, events) 2-tuples.
+Returns a list containing any descriptors that have events to
+report, as a list of (fd, events) 2-tuples.
[clinic start generated code]*/
static PyObject *
select_epoll_poll_impl(pyEpoll_Object *self, PyObject *timeout_obj,
int maxevents)
-/*[clinic end generated code: output=e02d121a20246c6c input=deafa7f04a60ebe0]*/
+/*[clinic end generated code: output=e02d121a20246c6c input=911ddc16978a9159]*/
{
int nfds, i;
PyObject *elist = NULL, *etuple = NULL;
}
/*[clinic input]
-@permit_long_docstring_body
signal.signal
signalnum: int
Set the action for the given signal.
The action can be SIG_DFL, SIG_IGN, or a callable Python object.
-The previous action is returned. See getsignal() for possible return values.
+The previous action is returned. See getsignal() for possible return
+values.
*** IMPORTANT NOTICE ***
-A signal handler function is called with two arguments:
-the first is the signal number, the second is the interrupted stack frame.
+A signal handler function is called with two arguments: the first is
+the signal number, the second is the interrupted stack frame.
[clinic start generated code]*/
static PyObject *
signal_signal_impl(PyObject *module, int signalnum, PyObject *handler)
-/*[clinic end generated code: output=b44cfda43780f3a1 input=7608656f34fa378b]*/
+/*[clinic end generated code: output=b44cfda43780f3a1 input=99ce4035ec56ffc1]*/
{
_signal_module_state *modstate = get_signal_state(module);
PyObject *old_handler;
#ifdef HAVE_SETITIMER
/*[clinic input]
-@permit_long_docstring_body
signal.setitimer
which: int
Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF).
-The timer will fire after value seconds and after that every interval seconds.
-The itimer can be cleared by setting seconds to zero.
+The timer will fire after value seconds and after that every interval
+seconds. The itimer can be cleared by setting seconds to zero.
Returns old values as a tuple: (delay, interval).
[clinic start generated code]*/
static PyObject *
signal_setitimer_impl(PyObject *module, int which, PyObject *seconds,
PyObject *interval)
-/*[clinic end generated code: output=65f9dcbddc35527b input=ab5bf2b8f5cff3f4]*/
+/*[clinic end generated code: output=65f9dcbddc35527b input=bd9f0d2ed8614193]*/
{
_signal_module_state *modstate = get_signal_state(module);
Wait for a signal.
Suspend execution of the calling thread until the delivery of one of the
-signals specified in the signal set sigset. The function accepts the signal
-and returns the signal number.
+signals specified in the signal set sigset. The function accepts the
+signal and returns the signal number.
[clinic start generated code]*/
static PyObject *
signal_sigwait_impl(PyObject *module, sigset_t sigset)
-/*[clinic end generated code: output=f43770699d682f96 input=a6fbd47b1086d119]*/
+/*[clinic end generated code: output=f43770699d682f96 input=91773742dd416a3e]*/
{
int err, signum;
}
/*[clinic input]
-@permit_long_docstring_body
_socket.socket.send
self as s: self(type="PySocketSockObject *")
data as pbuf: Py_buffer
Send a data string to the socket.
For the optional flags argument, see the Unix manual.
-Return the number of bytes sent; this may be less than len(data) if the network is busy.
+Return the number of bytes sent; this may be less than len(data) if
+the network is busy.
[clinic start generated code]*/
static PyObject *
_socket_socket_send_impl(PySocketSockObject *s, Py_buffer *pbuf, int flags)
-/*[clinic end generated code: output=3ddf83f17d0c875b input=e776a48af2e3d615]*/
+/*[clinic end generated code: output=3ddf83f17d0c875b input=d2b8af9bf99cfafb]*/
{
struct sock_send ctx;
For the optional flags argument, see the Unix manual.
This calls send() repeatedly until all data is sent.
-If an error occurs, it's impossible to tell how much data has been sent.
+If an error occurs, it's impossible to tell how much data has been
+sent.
[clinic start generated code]*/
static PyObject *
_socket_socket_sendall_impl(PySocketSockObject *s, Py_buffer *pbuf,
int flags)
-/*[clinic end generated code: output=ec92861424d3faa8 input=732b15b9ca64dce6]*/
+/*[clinic end generated code: output=ec92861424d3faa8 input=2600de13b4614893]*/
{
char *buf;
data as an iterable of bytes-like objects (e.g. bytes objects).
The ancdata argument specifies the ancillary data (control messages)
as an iterable of zero or more tuples (cmsg_level, cmsg_type,
-cmsg_data), where cmsg_level and cmsg_type are integers specifying the
-protocol level and protocol-specific type respectively, and cmsg_data
-is a bytes-like object holding the associated data. The flags
-argument defaults to 0 and has the same meaning as for send(). If
-address is supplied and not None, it sets a destination address for
-the message. The return value is the number of bytes of non-ancillary
-data sent.
+cmsg_data), where cmsg_level and cmsg_type are integers specifying
+the protocol level and protocol-specific type respectively, and
+cmsg_data is a bytes-like object holding the associated data. The
+flags argument defaults to 0 and has the same meaning as for send().
+If address is supplied and not None, it sets a destination address
+for the message. The return value is the number of bytes of
+non-ancillary data sent.
[clinic start generated code]*/
static PyObject *
_socket_socket_sendmsg_impl(PySocketSockObject *s, PyObject *data_arg,
PyObject *cmsg_arg, int flags,
PyObject *addr_arg)
-/*[clinic end generated code: output=3b4cb1110644ce39 input=479c13d90bd2f88b]*/
+/*[clinic end generated code: output=3b4cb1110644ce39 input=8ae408971a3aa329]*/
{
Py_ssize_t i, ndatabufs = 0, ncmsgs, ncmsgbufs = 0;
/*[clinic input]
+@permit_long_summary
_socket.if_indextoname
if_index as index: NET_IFINDEX
/
static PyObject *
_socket_if_indextoname_impl(PyObject *module, NET_IFINDEX index)
-/*[clinic end generated code: output=e48bc324993052e0 input=c93f753d0cf6d7d1]*/
+/*[clinic end generated code: output=e48bc324993052e0 input=2a0026b271cd43ae]*/
{
errno = ENXIO; // in case 'if_indextoname' does not set errno
char name[IF_NAMESIZE + 1];
}
/*[clinic input]
+@permit_long_summary
termios.tcdrain
fd: fildes
static PyObject *
termios_tcdrain_impl(PyObject *module, int fd)
-/*[clinic end generated code: output=5fd86944c6255955 input=c99241b140b32447]*/
+/*[clinic end generated code: output=5fd86944c6255955 input=d1557e60b5ec66c5]*/
{
termiosmodulestate *state = PyModule_GetState(module);
int r;
}
/*[clinic input]
-@permit_long_docstring_body
termios.tcsetwinsize
fd: fildes
Set the tty winsize for file descriptor fd.
The winsize to be set is taken from the winsize argument, which
-is a two-item tuple (ws_row, ws_col) like the one returned by tcgetwinsize().
+is a two-item tuple (ws_row, ws_col) like the one returned by
+tcgetwinsize().
[clinic start generated code]*/
static PyObject *
termios_tcsetwinsize_impl(PyObject *module, int fd, PyObject *winsz)
-/*[clinic end generated code: output=2ac3c9bb6eda83e1 input=9a163c4e06fc4a41]*/
+/*[clinic end generated code: output=2ac3c9bb6eda83e1 input=efc9beb16d06382a]*/
{
if (!PySequence_Check(winsz) || PySequence_Size(winsz) != 2) {
PyErr_SetString(PyExc_TypeError,
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.category
self: self
static PyObject *
unicodedata_UCD_category_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=8571539ee2e6783a input=27d6f3d85050bc06]*/
+/*[clinic end generated code: output=8571539ee2e6783a input=1d729c67299e8a31]*/
{
int index;
Py_UCS4 c = (Py_UCS4)chr;
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.bidirectional
self: self
static PyObject *
unicodedata_UCD_bidirectional_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=d36310ce2039bb92 input=b3d8f42cebfcf475]*/
+/*[clinic end generated code: output=d36310ce2039bb92 input=838f8a2203bd2990]*/
{
int index;
Py_UCS4 c = (Py_UCS4)chr;
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.mirrored -> int
self: self
static int
unicodedata_UCD_mirrored_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=2532dbf8121b50e6 input=5dd400d351ae6f3b]*/
+/*[clinic end generated code: output=2532dbf8121b50e6 input=6db28989e49cd9c8]*/
{
int index;
Py_UCS4 c = (Py_UCS4)chr;
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.east_asian_width
self: self
static PyObject *
unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=484e8537d9ee8197 input=c4854798aab026e0]*/
+/*[clinic end generated code: output=484e8537d9ee8197 input=207c5f68fa475516]*/
{
int index;
Py_UCS4 c = (Py_UCS4)chr;
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.is_normalized
self: self
static PyObject *
unicodedata_UCD_is_normalized_impl(PyObject *self, PyObject *form,
PyObject *input)
-/*[clinic end generated code: output=11e5a3694e723ca5 input=a544f14cea79e508]*/
+/*[clinic end generated code: output=11e5a3694e723ca5 input=de66aa679265300b]*/
{
if (PyUnicode_GET_LENGTH(input) == 0) {
/* special case empty input strings. */
}
/*[clinic input]
-@permit_long_docstring_body
+@permit_long_summary
zlib.Decompress.decompress
cls: defining_class
Return a bytes object containing the decompressed version of the data.
-After calling this function, some of the input data may still be stored in
-internal buffers for later processing.
+After calling this function, some of the input data may still be
+stored in internal buffers for later processing.
Call the flush() method to clear these buffers.
[clinic start generated code]*/
static PyObject *
zlib_Decompress_decompress_impl(compobject *self, PyTypeObject *cls,
Py_buffer *data, Py_ssize_t max_length)
-/*[clinic end generated code: output=b024a93c2c922d57 input=77de124bd2a2ecc0]*/
+/*[clinic end generated code: output=b024a93c2c922d57 input=9035027c9e4be7fd]*/
{
int err = Z_OK;
Py_ssize_t ibuflen;
}
/*[clinic input]
-@permit_long_docstring_body
zlib._ZlibDecompressor.decompress
data: Py_buffer
Decompress *data*, returning uncompressed data as bytes.
-If *max_length* is nonnegative, returns at most *max_length* bytes of
-decompressed data. If this limit is reached and further output can be
-produced, *self.needs_input* will be set to ``False``. In this case, the next
-call to *decompress()* may provide *data* as b'' to obtain more of the output.
+If *max_length* is nonnegative, returns at most *max_length* bytes
+of decompressed data. If this limit is reached and further output
+can be produced, *self.needs_input* will be set to ``False``. In
+this case, the next call to *decompress()* may provide *data* as b''
+to obtain more of the output.
-If all of the input data was decompressed and returned (either because this
-was less than *max_length* bytes, or because *max_length* was negative),
-*self.needs_input* will be set to True.
+If all of the input data was decompressed and returned (either
+because this was less than *max_length* bytes, or because
+*max_length* was negative), *self.needs_input* will be set to True.
-Attempting to decompress data after the end of stream is reached raises an
-EOFError. Any data found after the end of the stream is ignored and saved in
-the unused_data attribute.
+Attempting to decompress data after the end of stream is reached
+raises an EOFError. Any data found after the end of the stream is
+ignored and saved in the unused_data attribute.
[clinic start generated code]*/
static PyObject *
zlib__ZlibDecompressor_decompress_impl(ZlibDecompressor *self,
Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=ac00dcf73e843e99 input=c9278e791be1152b]*/
+/*[clinic end generated code: output=ac00dcf73e843e99 input=d7862eade3f29d56]*/
{
PyObject *result = NULL;
"\n"
"Return the value for `key` if `key` has the value in the context object.\n"
"\n"
-"If `key` does not exist, return `default`. If `default` is not given,\n"
-"return None.");
+"If `key` does not exist, return `default`. If `default` is not\n"
+"given, return None.");
#define _CONTEXTVARS_CONTEXT_GET_METHODDEF \
{"get", _PyCFunction_CAST(_contextvars_Context_get), METH_FASTCALL, _contextvars_Context_get__doc__},
"\n"
"Return a value for the context variable for the current context.\n"
"\n"
-"If there is no value for the variable in the current context, the method will:\n"
-" * return the value of the default argument of the method, if provided; or\n"
-" * return the default value for the context variable, if it was created\n"
-" with one; or\n"
+"If there is no value for the variable in the current context, the\n"
+"method will:\n"
+" * return the value of the default argument of the method, if\n"
+" provided; or\n"
+" * return the default value for the context variable, if it was\n"
+" created with one; or\n"
" * raise a LookupError.");
#define _CONTEXTVARS_CONTEXTVAR_GET_METHODDEF \
"\n"
"Call to set a new value for the context variable in the current context.\n"
"\n"
-"The required value argument is the new value for the context variable.\n"
+"The required value argument is the new value for the context\n"
+"variable.\n"
"\n"
-"Returns a Token object that can be used to restore the variable to its previous\n"
-"value via the `ContextVar.reset()` method.");
+"Returns a Token object that can be used to restore the variable to\n"
+"its previous value via the `ContextVar.reset()` method.");
#define _CONTEXTVARS_CONTEXTVAR_SET_METHODDEF \
{"set", (PyCFunction)_contextvars_ContextVar_set, METH_O, _contextvars_ContextVar_set__doc__},
"\n"
"Reset the context variable.\n"
"\n"
-"The variable is reset to the value it had before the `ContextVar.set()` that\n"
-"created the token was used.");
+"The variable is reset to the value it had before the\n"
+"`ContextVar.set()` that created the token was used.");
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
exit:
return return_value;
}
-/*[clinic end generated code: output=3a04b2fddf24c3e9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=90ec3e4375804e9b input=a9049054013a1b77]*/
"\n"
"Acquires the interpreter\'s import lock for the current thread.\n"
"\n"
-"This lock should be used by import hooks to ensure thread-safety when importing\n"
-"modules. On platforms without threads, this function does nothing.");
+"This lock should be used by import hooks to ensure thread-safety when\n"
+"importing modules. On platforms without threads, this function does\n"
+"nothing.");
#define _IMP_ACQUIRE_LOCK_METHODDEF \
{"acquire_lock", (PyCFunction)_imp_acquire_lock, METH_NOARGS, _imp_acquire_lock__doc__},
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=5fa42f580441b3fa input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0974db098d601372 input=a9049054013a1b77]*/
" allow_code\n"
" Allow to write code objects.\n"
"\n"
-"Raise a ValueError exception if value has (or contains an object that has) an\n"
-"unsupported type.");
+"Raise a ValueError exception if value has (or contains an object that\n"
+"has) an unsupported type.");
#define MARSHAL_DUMPS_METHODDEF \
{"dumps", _PyCFunction_CAST(marshal_dumps), METH_FASTCALL|METH_KEYWORDS, marshal_dumps__doc__},
" allow_code\n"
" Allow to load code objects.\n"
"\n"
-"If no valid value is found, raise EOFError, ValueError or TypeError. Extra\n"
-"bytes in the input are ignored.");
+"If no valid value is found, raise EOFError, ValueError or TypeError.\n"
+"Extra bytes in the input are ignored.");
#define MARSHAL_LOADS_METHODDEF \
{"loads", _PyCFunction_CAST(marshal_loads), METH_FASTCALL|METH_KEYWORDS, marshal_loads__doc__},
return return_value;
}
-/*[clinic end generated code: output=3e4bfc070a3c78ac input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a574570c3717f60e input=a9049054013a1b77]*/
"\n"
"Dump stats to file, and clears the stats.\n"
"\n"
-"Return False if no statistics were not dumped because stats gathering was off.");
+"Return False if no statistics were not dumped because stats gathering\n"
+"was off.");
#define SYS__STATS_DUMP_METHODDEF \
{"_stats_dump", (PyCFunction)sys__stats_dump, METH_NOARGS, sys__stats_dump__doc__},
"Executes a file containing Python code in a given remote Python process.\n"
"\n"
"This function returns immediately, and the code will be executed by the\n"
-"target process\'s main thread at the next available opportunity, similarly\n"
-"to how signals are handled. There is no interface to determine when the\n"
-"code has been executed. The caller is responsible for making sure that\n"
-"the file still exists whenever the remote process tries to read it and that\n"
-"it hasn\'t been overwritten.\n"
+"target process\'s main thread at the next available opportunity,\n"
+"similarly to how signals are handled. There is no interface to\n"
+"determine when the code has been executed. The caller is responsible\n"
+"for making sure that the file still exists whenever the remote process\n"
+"tries to read it and that it hasn\'t been overwritten.\n"
"\n"
-"The remote process must be running a CPython interpreter of the same major\n"
-"and minor version as the local process. If either the local or remote\n"
-"interpreter is pre-release (alpha, beta, or release candidate) then the\n"
-"local and remote interpreters must be the same exact version.\n"
+"The remote process must be running a CPython interpreter of the same\n"
+"major and minor version as the local process. If either the local or\n"
+"remote interpreter is pre-release (alpha, beta, or release candidate)\n"
+"then the local and remote interpreters must be the same exact version.\n"
"\n"
"Args:\n"
" pid (int): The process ID of the target Python process.\n"
"\n"
"The mode parameter must be one of the following strings:\n"
"- \"all\": All top-level imports become potentially lazy\n"
-"- \"normal\": Only explicitly marked imports (with \'lazy\' keyword) are lazy\n"
+"- \"normal\": Only explicitly marked imports (with \'lazy\' keyword) are\n"
+" lazy\n"
"\n"
"In addition to the mode, lazy imports can be controlled via the filter\n"
"provided to sys.set_lazy_imports_filter");
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
#define SYS_GETANDROIDAPILEVEL_METHODDEF
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
-/*[clinic end generated code: output=fb4fe1af274124e0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8a4482f9c5c493e5 input=a9049054013a1b77]*/
/*[clinic input]
+@permit_long_summary
_contextvars.Context.get
key: object
default: object = None
Return the value for `key` if `key` has the value in the context object.
-If `key` does not exist, return `default`. If `default` is not given,
-return None.
+If `key` does not exist, return `default`. If `default` is not
+given, return None.
[clinic start generated code]*/
static PyObject *
_contextvars_Context_get_impl(PyContext *self, PyObject *key,
PyObject *default_value)
-/*[clinic end generated code: output=0c54aa7664268189 input=c8eeb81505023995]*/
+/*[clinic end generated code: output=0c54aa7664268189 input=d669a0d56fabb0a5]*/
{
if (context_check_key_type(key)) {
return NULL;
/*[clinic input]
-@permit_long_docstring_body
_contextvars.ContextVar.get
default: object = NULL
/
Return a value for the context variable for the current context.
-If there is no value for the variable in the current context, the method will:
- * return the value of the default argument of the method, if provided; or
- * return the default value for the context variable, if it was created
- with one; or
+If there is no value for the variable in the current context, the
+method will:
+ * return the value of the default argument of the method, if
+ provided; or
+ * return the default value for the context variable, if it was
+ created with one; or
* raise a LookupError.
[clinic start generated code]*/
static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value)
-/*[clinic end generated code: output=0746bd0aa2ced7bf input=da66664d5d0af4ad]*/
+/*[clinic end generated code: output=0746bd0aa2ced7bf input=83814c6aef4a9fe3]*/
{
PyObject *val;
if (PyContextVar_Get((PyObject *)self, default_value, &val) < 0) {
}
/*[clinic input]
-@permit_long_docstring_body
+@permit_long_summary
_contextvars.ContextVar.set
value: object
/
Call to set a new value for the context variable in the current context.
-The required value argument is the new value for the context variable.
+The required value argument is the new value for the context
+variable.
-Returns a Token object that can be used to restore the variable to its previous
-value via the `ContextVar.reset()` method.
+Returns a Token object that can be used to restore the variable to
+its previous value via the `ContextVar.reset()` method.
[clinic start generated code]*/
static PyObject *
_contextvars_ContextVar_set_impl(PyContextVar *self, PyObject *value)
-/*[clinic end generated code: output=1b562d35cc79c806 input=73ebbbfc7c98f6cd]*/
+/*[clinic end generated code: output=1b562d35cc79c806 input=04ef8dcd810f5be6]*/
{
return PyContextVar_Set((PyObject *)self, value);
}
/*[clinic input]
-@permit_long_docstring_body
_contextvars.ContextVar.reset
token: object
/
Reset the context variable.
-The variable is reset to the value it had before the `ContextVar.set()` that
-created the token was used.
+The variable is reset to the value it had before the
+`ContextVar.set()` that created the token was used.
[clinic start generated code]*/
static PyObject *
_contextvars_ContextVar_reset_impl(PyContextVar *self, PyObject *token)
-/*[clinic end generated code: output=3205d2bdff568521 input=b8bc514a9245242a]*/
+/*[clinic end generated code: output=3205d2bdff568521 input=dd33cfcb18c00e37]*/
{
if (!PyContextToken_CheckExact(token)) {
PyErr_Format(PyExc_TypeError,
}
/*[clinic input]
-@permit_long_docstring_body
_imp.acquire_lock
Acquires the interpreter's import lock for the current thread.
-This lock should be used by import hooks to ensure thread-safety when importing
-modules. On platforms without threads, this function does nothing.
+This lock should be used by import hooks to ensure thread-safety when
+importing modules. On platforms without threads, this function does
+nothing.
[clinic start generated code]*/
static PyObject *
_imp_acquire_lock_impl(PyObject *module)
-/*[clinic end generated code: output=1aff58cb0ee1b026 input=e1a4ef049d34e7dd]*/
+/*[clinic end generated code: output=1aff58cb0ee1b026 input=60e9c1b4ab471ead]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
_PyImport_AcquireLock(interp);
}
/*[clinic input]
+@permit_long_summary
_imp.find_frozen
name: unicode
static PyObject *
_imp_find_frozen_impl(PyObject *module, PyObject *name, int withdata)
-/*[clinic end generated code: output=8c1c3c7f925397a5 input=22a8847c201542fd]*/
+/*[clinic end generated code: output=8c1c3c7f925397a5 input=30a7a50da49eca97]*/
{
struct frozen_info info;
frozen_status status = find_frozen(name, &info);
}
/*[clinic input]
+@permit_long_summary
_imp._override_multi_interp_extensions_check
override: int
static PyObject *
_imp__override_multi_interp_extensions_check_impl(PyObject *module,
int override)
-/*[clinic end generated code: output=3ff043af52bbf280 input=e086a2ea181f92ae]*/
+/*[clinic end generated code: output=3ff043af52bbf280 input=24f23f8510a7f6e7]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
if (_Py_IsMainInterpreter(interp)) {
/*[clinic input]
@permit_long_summary
-@permit_long_docstring_body
marshal.dumps
value: object
Return the bytes object that would be written to a file by dump(value, file).
-Raise a ValueError exception if value has (or contains an object that has) an
-unsupported type.
+Raise a ValueError exception if value has (or contains an object that
+has) an unsupported type.
[clinic start generated code]*/
static PyObject *
marshal_dumps_impl(PyObject *module, PyObject *value, int version,
int allow_code)
-/*[clinic end generated code: output=115f90da518d1d49 input=80cd3f30c1637ade]*/
+/*[clinic end generated code: output=115f90da518d1d49 input=dc1edcafd43124c5]*/
{
return _PyMarshal_WriteObjectToString(value, version, allow_code);
}
Convert the bytes-like object to a value.
-If no valid value is found, raise EOFError, ValueError or TypeError. Extra
-bytes in the input are ignored.
+If no valid value is found, raise EOFError, ValueError or TypeError.
+Extra bytes in the input are ignored.
[clinic start generated code]*/
static PyObject *
marshal_loads_impl(PyObject *module, Py_buffer *bytes, int allow_code)
-/*[clinic end generated code: output=62c0c538d3edc31f input=14de68965b45aaa7]*/
+/*[clinic end generated code: output=62c0c538d3edc31f input=286f1dbd6811d2ad]*/
{
RFILE rf;
char *s = bytes->buf;
/*[clinic input]
+@permit_long_summary
sys.get_int_max_str_digits
Return the maximum string digits limit for non-binary int<->str conversions.
static PyObject *
sys_get_int_max_str_digits_impl(PyObject *module)
-/*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/
+/*[clinic end generated code: output=0042f5e8ae0e8631 input=77fb74e987ba7ecb]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
return PyLong_FromLong(interp->long_state.max_str_digits);
/*[clinic input]
+@permit_long_summary
sys.set_int_max_str_digits
maxdigits: int
static PyObject *
sys_set_int_max_str_digits_impl(PyObject *module, int maxdigits)
-/*[clinic end generated code: output=734d4c2511f2a56d input=d7e3f325db6910c5]*/
+/*[clinic end generated code: output=734d4c2511f2a56d input=d4c0bf50c466d57a]*/
{
if (_PySys_SetIntMaxStrDigits(maxdigits) < 0) {
return NULL;
}
/*[clinic input]
+@permit_long_summary
sys._current_frames
Return a dict mapping each thread's thread id to its current stack frame.
static PyObject *
sys__current_frames_impl(PyObject *module)
-/*[clinic end generated code: output=d2a41ac0a0a3809a input=2a9049c5f5033691]*/
+/*[clinic end generated code: output=d2a41ac0a0a3809a input=e1ce34f43501e0d6]*/
{
return _PyThread_CurrentFrames();
}
}
/*[clinic input]
-@permit_long_docstring_body
sys._stats_dump -> bool
Dump stats to file, and clears the stats.
-Return False if no statistics were not dumped because stats gathering was off.
+Return False if no statistics were not dumped because stats gathering
+was off.
[clinic start generated code]*/
static int
sys__stats_dump_impl(PyObject *module)
-/*[clinic end generated code: output=6e346b4ba0de4489 input=5a3ab40d2fb5af47]*/
+/*[clinic end generated code: output=6e346b4ba0de4489 input=7f3b7758cb59d2ff]*/
{
int res = _Py_PrintSpecializationStats(1);
_Py_StatsClear();
Executes a file containing Python code in a given remote Python process.
This function returns immediately, and the code will be executed by the
-target process's main thread at the next available opportunity, similarly
-to how signals are handled. There is no interface to determine when the
-code has been executed. The caller is responsible for making sure that
-the file still exists whenever the remote process tries to read it and that
-it hasn't been overwritten.
+target process's main thread at the next available opportunity,
+similarly to how signals are handled. There is no interface to
+determine when the code has been executed. The caller is responsible
+for making sure that the file still exists whenever the remote process
+tries to read it and that it hasn't been overwritten.
-The remote process must be running a CPython interpreter of the same major
-and minor version as the local process. If either the local or remote
-interpreter is pre-release (alpha, beta, or release candidate) then the
-local and remote interpreters must be the same exact version.
+The remote process must be running a CPython interpreter of the same
+major and minor version as the local process. If either the local or
+remote interpreter is pre-release (alpha, beta, or release candidate)
+then the local and remote interpreters must be the same exact version.
Args:
pid (int): The process ID of the target Python process.
static PyObject *
sys_remote_exec_impl(PyObject *module, int pid, PyObject *script)
-/*[clinic end generated code: output=7d94c56afe4a52c0 input=39908ca2c5fe1eb0]*/
+/*[clinic end generated code: output=7d94c56afe4a52c0 input=7bd58f8da20cb74c]*/
{
PyObject *path;
const char *debugger_script_path;
The mode parameter must be one of the following strings:
- "all": All top-level imports become potentially lazy
-- "normal": Only explicitly marked imports (with 'lazy' keyword) are lazy
+- "normal": Only explicitly marked imports (with 'lazy' keyword) are
+ lazy
In addition to the mode, lazy imports can be controlled via the filter
provided to sys.set_lazy_imports_filter
static PyObject *
sys_set_lazy_imports_impl(PyObject *module, PyObject *mode)
-/*[clinic end generated code: output=1ff34ba6c4feaf73 input=036c75a65f42cbc2]*/
+/*[clinic end generated code: output=1ff34ba6c4feaf73 input=db3242f0ff6e5dcc]*/
{
PyImport_LazyImportsMode lazy_mode;
if (!PyUnicode_Check(mode)) {
Pydoc adds indentation when displaying functions and methods.
To keep the total width of within 80 characters, we use a
- maximum of 76 characters for global functions and classes,
- and 72 characters for methods.
+ maximum of 72 characters for global functions and classes,
+ and 68 characters for methods.
"""
if self.cls is not None and not self.kind.new_or_init:
- return 72
- return 76
+ return 68
+ return 72
def __repr__(self) -> str:
return f'<clinic.Function {self.name!r}>'