Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python3.10 /
html /
_sources /
c-api /
[ HOME SHELL ]
Name
Size
Permission
Action
abstract.rst.txt
723
B
-rw-r--r--
allocation.rst.txt
2.58
KB
-rw-r--r--
apiabiversion.rst.txt
2.31
KB
-rw-r--r--
arg.rst.txt
30.78
KB
-rw-r--r--
bool.rst.txt
1.2
KB
-rw-r--r--
buffer.rst.txt
22.36
KB
-rw-r--r--
bytearray.rst.txt
2.2
KB
-rw-r--r--
bytes.rst.txt
9.2
KB
-rw-r--r--
call.rst.txt
16.56
KB
-rw-r--r--
capsule.rst.txt
5.68
KB
-rw-r--r--
cell.rst.txt
1.94
KB
-rw-r--r--
code.rst.txt
2.56
KB
-rw-r--r--
codec.rst.txt
5.01
KB
-rw-r--r--
complex.rst.txt
4.13
KB
-rw-r--r--
concrete.rst.txt
2.03
KB
-rw-r--r--
contextvars.rst.txt
4.11
KB
-rw-r--r--
conversion.rst.txt
5.39
KB
-rw-r--r--
coro.rst.txt
862
B
-rw-r--r--
datetime.rst.txt
8.46
KB
-rw-r--r--
descriptor.rst.txt
1.08
KB
-rw-r--r--
dict.rst.txt
8.51
KB
-rw-r--r--
exceptions.rst.txt
49.24
KB
-rw-r--r--
file.rst.txt
4.25
KB
-rw-r--r--
float.rst.txt
2.27
KB
-rw-r--r--
function.rst.txt
3.37
KB
-rw-r--r--
gcsupport.rst.txt
8.52
KB
-rw-r--r--
gen.rst.txt
1.35
KB
-rw-r--r--
import.rst.txt
12.61
KB
-rw-r--r--
index.rst.txt
632
B
-rw-r--r--
init.rst.txt
69.48
KB
-rw-r--r--
init_config.rst.txt
48.17
KB
-rw-r--r--
intro.rst.txt
32.03
KB
-rw-r--r--
iter.rst.txt
1.98
KB
-rw-r--r--
iterator.rst.txt
1.67
KB
-rw-r--r--
list.rst.txt
4.61
KB
-rw-r--r--
long.rst.txt
10.72
KB
-rw-r--r--
mapping.rst.txt
3.47
KB
-rw-r--r--
marshal.rst.txt
3.71
KB
-rw-r--r--
memory.rst.txt
29.92
KB
-rw-r--r--
memoryview.rst.txt
2.32
KB
-rw-r--r--
method.rst.txt
2.71
KB
-rw-r--r--
module.rst.txt
22.8
KB
-rw-r--r--
none.rst.txt
736
B
-rw-r--r--
number.rst.txt
10.83
KB
-rw-r--r--
objbuffer.rst.txt
2.39
KB
-rw-r--r--
object.rst.txt
15.14
KB
-rw-r--r--
objimpl.rst.txt
300
B
-rw-r--r--
refcounting.rst.txt
4.18
KB
-rw-r--r--
reflection.rst.txt
1.96
KB
-rw-r--r--
sequence.rst.txt
6.62
KB
-rw-r--r--
set.rst.txt
6.22
KB
-rw-r--r--
slice.rst.txt
4.47
KB
-rw-r--r--
stable.rst.txt
6.44
KB
-rw-r--r--
structures.rst.txt
18.59
KB
-rw-r--r--
sys.rst.txt
16.47
KB
-rw-r--r--
tuple.rst.txt
8.45
KB
-rw-r--r--
type.rst.txt
9.86
KB
-rw-r--r--
typehints.rst.txt
1.67
KB
-rw-r--r--
typeobj.rst.txt
126.97
KB
-rw-r--r--
unicode.rst.txt
67.91
KB
-rw-r--r--
utilities.rst.txt
410
B
-rw-r--r--
veryhigh.rst.txt
15.57
KB
-rw-r--r--
weakref.rst.txt
3.03
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : set.rst.txt
.. highlight:: c .. _setobjects: Set Objects ----------- .. sectionauthor:: Raymond D. Hettinger <python@rcn.com> .. index:: object: set object: frozenset This section details the public API for :class:`set` and :class:`frozenset` objects. Any functionality not listed below is best accessed using either the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:`PyNumber_InPlaceXor`). .. c:type:: PySetObject This subtype of :c:type:`PyObject` is used to hold the internal data for both :class:`set` and :class:`frozenset` objects. It is like a :c:type:`PyDictObject` in that it is a fixed size for small sets (much like tuple storage) and will point to a separate, variable sized block of memory for medium and large sized sets (much like list storage). None of the fields of this structure should be considered public and all are subject to change. All access should be done through the documented API rather than by manipulating the values in the structure. .. c:var:: PyTypeObject PySet_Type This is an instance of :c:type:`PyTypeObject` representing the Python :class:`set` type. .. c:var:: PyTypeObject PyFrozenSet_Type This is an instance of :c:type:`PyTypeObject` representing the Python :class:`frozenset` type. The following type check macros work on pointers to any Python object. Likewise, the constructor functions work with any iterable Python object. .. c:function:: int PySet_Check(PyObject *p) Return true if *p* is a :class:`set` object or an instance of a subtype. This function always succeeds. .. c:function:: int PyFrozenSet_Check(PyObject *p) Return true if *p* is a :class:`frozenset` object or an instance of a subtype. This function always succeeds. .. c:function:: int PyAnySet_Check(PyObject *p) Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or an instance of a subtype. This function always succeeds. .. c:function:: int PySet_CheckExact(PyObject *p) Return true if *p* is a :class:`set` object but not an instance of a subtype. This function always succeeds. .. versionadded:: 3.10 .. c:function:: int PyAnySet_CheckExact(PyObject *p) Return true if *p* is a :class:`set` object or a :class:`frozenset` object but not an instance of a subtype. This function always succeeds. .. c:function:: int PyFrozenSet_CheckExact(PyObject *p) Return true if *p* is a :class:`frozenset` object but not an instance of a subtype. This function always succeeds. .. c:function:: PyObject* PySet_New(PyObject *iterable) Return a new :class:`set` containing objects returned by the *iterable*. The *iterable* may be ``NULL`` to create a new empty set. Return the new set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is not actually iterable. The constructor is also useful for copying a set (``c=set(s)``). .. c:function:: PyObject* PyFrozenSet_New(PyObject *iterable) Return a new :class:`frozenset` containing objects returned by the *iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. Return the new set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is not actually iterable. The following functions and macros are available for instances of :class:`set` or :class:`frozenset` or instances of their subtypes. .. c:function:: Py_ssize_t PySet_Size(PyObject *anyset) .. index:: builtin: len Return the length of a :class:`set` or :class:`frozenset` object. Equivalent to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, or an instance of a subtype. .. c:function:: Py_ssize_t PySet_GET_SIZE(PyObject *anyset) Macro form of :c:func:`PySet_Size` without error checking. .. c:function:: int PySet_Contains(PyObject *anyset, PyObject *key) Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is encountered. Unlike the Python :meth:`__contains__` method, this function does not automatically convert unhashable sets into temporary frozensets. Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:`PyExc_SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, or an instance of a subtype. .. c:function:: int PySet_Add(PyObject *set, PyObject *key) Add *key* to a :class:`set` instance. Also works with :class:`frozenset` instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the values of brand new frozensets before they are exposed to other code). Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to grow. Raise a :exc:`SystemError` if *set* is not an instance of :class:`set` or its subtype. The following functions are available for instances of :class:`set` or its subtypes but not for instances of :class:`frozenset` or its subtypes. .. c:function:: int PySet_Discard(PyObject *set, PyObject *key) Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard` method, this function does not automatically convert unhashable sets into temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is not an instance of :class:`set` or its subtype. .. c:function:: PyObject* PySet_Pop(PyObject *set) Return a new reference to an arbitrary object in the *set*, and removes the object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` if the set is empty. Raise a :exc:`SystemError` if *set* is not an instance of :class:`set` or its subtype. .. c:function:: int PySet_Clear(PyObject *set) Empty an existing set of all elements.
Close