chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6d540908-430f-4359-b88e-b0b3869a63d3 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,433 | supabase-export-v2 | e69413b4b9d0d987 | How are lists implemented in CPython? -------------------------------------
CPython's lists are really variable-length arrays, not Lisp-style linked lists. The implementation uses a contiguous array of references to other objects, and
keeps a pointer to this array and the array's length in a list head structure. | trusted_official_docs | CPython Docs | How are lists implemented in CPython? -------------------------------------
CPython's lists are really variable-length arrays, not Lisp-style linked lists. The implementation uses a contiguous array of references to other objects, and
keeps a pointer to this array and the array's length in a list head structure. | How are lists implemented in CPython? -------------------------------------
CPython's lists are really variable-length arrays, not Lisp-style linked lists. The implementation uses a contiguous array of references to other objects, and
keeps a pointer to this array and the array's length in a list head structure. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6e9ee2d6-83c7-4c1e-8fdb-cd1acab43f2b | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,483 | supabase-export-v2 | 017182e5185118bb | with obj: a = 1 # equivalent to obj.a = 1 total = total + 1 # obj.total = obj.total + 1
In Python, such a construct would be ambiguous. | trusted_official_docs | CPython Docs | with obj: a = 1 # equivalent to obj.a = 1 total = total + 1 # obj.total = obj.total + 1
In Python, such a construct would be ambiguous. | with obj: a = 1 # equivalent to obj.a = 1 total = total + 1 # obj.total = obj.total + 1
In Python, such a construct would be ambiguous. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70524fd4-836d-4324-8530-c13a0df4eaf5 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,385 | supabase-export-v2 | 79ff922e15e0fc9f | There are two common arguments against this usage.
The first runs along the lines of: "It looks really ugly using a method of a
string literal (string constant)", to which the answer is that it might, but a
string literal is just a fixed value. If the methods are to be allowed on names
bound to strings there is no logi... | trusted_official_docs | CPython Docs | There are two common arguments against this usage.
The first runs along the lines of: "It looks really ugly using a method of a
string literal (string constant)", to which the answer is that it might, but a
string literal is just a fixed value. If the methods are to be allowed on names
bound to strings there is no logi... | There are two common arguments against this usage.
The first runs along the lines of: "It looks really ugly using a method of a
string literal (string constant)", to which the answer is that it might, but a
string literal is just a fixed value. If the methods are to be allowed on names
bound to strings there is no logi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
71ab22a0-e4fb-4c6b-9342-657ee413bdc6 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,470 | supabase-export-v2 | 398d5335dfda6738 | calls. Many feel that exceptions can conveniently emulate all reasonable uses of the ``go`` or ``goto`` constructs of C, Fortran, and other languages. For example::
class label(Exception): pass # declare a label | trusted_official_docs | CPython Docs | calls. Many feel that exceptions can conveniently emulate all reasonable uses of the ``go`` or ``goto`` constructs of C, Fortran, and other languages. For example::
class label(Exception): pass # declare a label | calls. Many feel that exceptions can conveniently emulate all reasonable uses of the ``go`` or ``goto`` constructs of C, Fortran, and other languages. For example::
class label(Exception): pass # declare a label | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
71fee73b-d54d-4f7f-b515-f25ea66a8b6c | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,493 | supabase-export-v2 | 6a0f71a11925812d | ref = function(args).mydict[index][index] ref.a = 21 ref.b = 42 ref.c = 63
This also has the side-effect of increasing execution speed because name
bindings are resolved at run-time in Python, and the second version only needs
to perform the resolution once. | trusted_official_docs | CPython Docs | ref = function(args).mydict[index][index] ref.a = 21 ref.b = 42 ref.c = 63
This also has the side-effect of increasing execution speed because name
bindings are resolved at run-time in Python, and the second version only needs
to perform the resolution once. | ref = function(args).mydict[index][index] ref.a = 21 ref.b = 42 ref.c = 63
This also has the side-effect of increasing execution speed because name
bindings are resolved at run-time in Python, and the second version only needs
to perform the resolution once. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
724b8cb9-a9bf-41d5-90e6-b7f09e190ae3 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,456 | supabase-export-v2 | ec3131d8a1d6d1fd | anomalies. Don't do this unless you are prepared to think hard about the requirements and the consequences of not meeting them correctly. Consider yourself warned.
Why doesn't list.sort() return the sorted list? ----------------------------------------------- | trusted_official_docs | CPython Docs | anomalies. Don't do this unless you are prepared to think hard about the requirements and the consequences of not meeting them correctly. Consider yourself warned.
Why doesn't list.sort() return the sorted list? ----------------------------------------------- | anomalies. Don't do this unless you are prepared to think hard about the requirements and the consequences of not meeting them correctly. Consider yourself warned.
Why doesn't list.sort() return the sorted list? ----------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
74cc5568-feaf-4bc9-8bd9-cfcaa2c541b1 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,388 | supabase-export-v2 | 1723e66c7bb6bc6a | "1, 2, 4, 8, 16".split(", ")
is an instruction to a string literal to return the substrings delimited by the
given separator (or, by default, arbitrary runs of white space). | trusted_official_docs | CPython Docs | "1, 2, 4, 8, 16".split(", ")
is an instruction to a string literal to return the substrings delimited by the
given separator (or, by default, arbitrary runs of white space). | "1, 2, 4, 8, 16".split(", ")
is an instruction to a string literal to return the substrings delimited by the
given separator (or, by default, arbitrary runs of white space). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
76366dc6-bbc3-4f5d-9d6a-4ad2805d9342 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,434 | supabase-export-v2 | 3fe8751527ed1479 | uses a contiguous array of references to other objects, and keeps a pointer to this array and the array's length in a list head structure.
This makes indexing a list ``a[i]`` an operation whose cost is independent of
the size of the list or the value of the index. | trusted_official_docs | CPython Docs | uses a contiguous array of references to other objects, and keeps a pointer to this array and the array's length in a list head structure.
This makes indexing a list ``a[i]`` an operation whose cost is independent of
the size of the list or the value of the index. | uses a contiguous array of references to other objects, and keeps a pointer to this array and the array's length in a list head structure.
This makes indexing a list ``a[i]`` an operation whose cost is independent of
the size of the list or the value of the index. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
76e4dfeb-6c84-4038-80b9-a1e0d7d35c14 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,467 | supabase-export-v2 | 036d82828c88909f | suite first, before you write any of the actual code. Of course Python allows you to be sloppy and not write test cases at all.
Why is there no goto? --------------------- | trusted_official_docs | CPython Docs | suite first, before you write any of the actual code. Of course Python allows you to be sloppy and not write test cases at all.
Why is there no goto? --------------------- | suite first, before you write any of the actual code. Of course Python allows you to be sloppy and not write test cases at all.
Why is there no goto? --------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
770c4653-7de0-4462-8987-df6618cbf5db | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,367 | supabase-export-v2 | bfac5fc360cc92fc | a derived class method wants to extend the base class method of the same name and thus has to call the base class method somehow.
Finally, for instance variables it solves a syntactic problem with assignment:
since local variables in Python are (by definition!) those variables to which a
value is assigned in a function... | trusted_official_docs | CPython Docs | a derived class method wants to extend the base class method of the same name and thus has to call the base class method somehow.
Finally, for instance variables it solves a syntactic problem with assignment:
since local variables in Python are (by definition!) those variables to which a
value is assigned in a function... | a derived class method wants to extend the base class method of the same name and thus has to call the base class method somehow.
Finally, for instance variables it solves a syntactic problem with assignment:
since local variables in Python are (by definition!) those variables to which a
value is assigned in a function... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7775e96a-b4a6-4596-bea4-20fd1cbd61dc | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,486 | supabase-export-v2 | f0089fbd5d95a3fb | This makes it impossible to know, from a simple reading, what attribute is being referenced: a local one, a global one, or a member attribute?
For instance, take the following incomplete snippet:: | trusted_official_docs | CPython Docs | This makes it impossible to know, from a simple reading, what attribute is being referenced: a local one, a global one, or a member attribute?
For instance, take the following incomplete snippet:: | This makes it impossible to know, from a simple reading, what attribute is being referenced: a local one, a global one, or a member attribute?
For instance, take the following incomplete snippet:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
784eaa98-c3a3-4430-a260-484e2d54db9d | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,392 | supabase-export-v2 | e8d04ff8d3c9f6a5 | if no exceptions are raised. Actually catching an exception is expensive. In versions of Python prior to 2.0 it was common to use this idiom::
try:
value = mydict[key]
except KeyError:
mydict[key] = getvalue(key)
value = mydict[key] | trusted_official_docs | CPython Docs | if no exceptions are raised. Actually catching an exception is expensive. In versions of Python prior to 2.0 it was common to use this idiom::
try:
value = mydict[key]
except KeyError:
mydict[key] = getvalue(key)
value = mydict[key] | if no exceptions are raised. Actually catching an exception is expensive. In versions of Python prior to 2.0 it was common to use this idiom::
try:
value = mydict[key]
except KeyError:
mydict[key] = getvalue(key)
value = mydict[key] | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7af2f1f8-2e68-406c-b095-b2ba6b52ca13 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,507 | supabase-export-v2 | d1a067f222d223fc | because you don't have to remember to add a comma to the previous line. The lines can also be reordered without creating a syntax error.
Accidentally omitting the comma can lead to errors that are hard to diagnose. For example:: | trusted_official_docs | CPython Docs | because you don't have to remember to add a comma to the previous line. The lines can also be reordered without creating a syntax error.
Accidentally omitting the comma can lead to errors that are hard to diagnose. For example:: | because you don't have to remember to add a comma to the previous line. The lines can also be reordered without creating a syntax error.
Accidentally omitting the comma can lead to errors that are hard to diagnose. For example:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bb60262-ae0f-4eba-b989-4d27f3bc1218 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,366 | supabase-export-v2 | 681f5e7895c0820a | Some C++ and Java coding standards call for instance attributes to have an ``m_`` prefix, so this explicitness is still useful in those languages, too.
Second, it means that no special syntax is necessary if you want to explicitly
reference or call the method from a particular class. In C++, if you want to
use a method... | trusted_official_docs | CPython Docs | Some C++ and Java coding standards call for instance attributes to have an ``m_`` prefix, so this explicitness is still useful in those languages, too.
Second, it means that no special syntax is necessary if you want to explicitly
reference or call the method from a particular class. In C++, if you want to
use a method... | Some C++ and Java coding standards call for instance attributes to have an ``m_`` prefix, so this explicitness is still useful in those languages, too.
Second, it means that no special syntax is necessary if you want to explicitly
reference or call the method from a particular class. In C++, if you want to
use a method... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c392106-9ea3-47c4-89a3-096ca184d645 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,489 | supabase-export-v2 | ed92f3ed09386ac3 | global variable named ``x``, will it be used inside the :keyword:`with` block? As you see, the dynamic nature of Python makes such choices much harder.
The primary benefit of :keyword:`with` and similar language features (reduction of code
volume) can, however, easily be achieved in Python by assignment. Instead of:: | trusted_official_docs | CPython Docs | global variable named ``x``, will it be used inside the :keyword:`with` block? As you see, the dynamic nature of Python makes such choices much harder.
The primary benefit of :keyword:`with` and similar language features (reduction of code
volume) can, however, easily be achieved in Python by assignment. Instead of:: | global variable named ``x``, will it be used inside the :keyword:`with` block? As you see, the dynamic nature of Python makes such choices much harder.
The primary benefit of :keyword:`with` and similar language features (reduction of code
volume) can, however, easily be achieved in Python by assignment. Instead of:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7cef1f8d-d99b-404a-bb83-0aad04028e91 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,381 | supabase-export-v2 | f587ce6aea321c1a | Why is join() a string method instead of a list or tuple method? ----------------------------------------------------------------
Strings became much more like other standard types starting in Python 1.6, when
methods were added which give the same functionality that has always been
available using the functions of the... | trusted_official_docs | CPython Docs | Why is join() a string method instead of a list or tuple method? ----------------------------------------------------------------
Strings became much more like other standard types starting in Python 1.6, when
methods were added which give the same functionality that has always been
available using the functions of the... | Why is join() a string method instead of a list or tuple method? ----------------------------------------------------------------
Strings became much more like other standard types starting in Python 1.6, when
methods were added which give the same functionality that has always been
available using the functions of the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e192837-06b7-4f5e-8a70-fe0accbf1bbb | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,436 | supabase-export-v2 | 3b396b6b81b44b76 | of appending items repeatedly; when the array must be grown, some extra space is allocated so the next few times don't require an actual resize.
How are dictionaries implemented in CPython? -------------------------------------------- | trusted_official_docs | CPython Docs | of appending items repeatedly; when the array must be grown, some extra space is allocated so the next few times don't require an actual resize.
How are dictionaries implemented in CPython? -------------------------------------------- | of appending items repeatedly; when the array must be grown, some extra space is allocated so the next few times don't require an actual resize.
How are dictionaries implemented in CPython? -------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7ee0cbc3-fd7d-4ed5-b2da-419b600e8efa | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,414 | supabase-export-v2 | d7ffff2850cb8203 | Python with optional annotations into C extensions. `Nuitka <https://nuitka.net/>`_ is an up-and-coming compiler of Python into C++ code, aiming to support the full Python language.
How does Python manage memory? ------------------------------ | trusted_official_docs | CPython Docs | Python with optional annotations into C extensions. `Nuitka <https://nuitka.net/>`_ is an up-and-coming compiler of Python into C++ code, aiming to support the full Python language.
How does Python manage memory? ------------------------------ | Python with optional annotations into C extensions. `Nuitka <https://nuitka.net/>`_ is an up-and-coming compiler of Python into C++ code, aiming to support the full Python language.
How does Python manage memory? ------------------------------ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7f3b84b6-e500-4c55-87bf-cd1e0bad9095 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,425 | supabase-export-v2 | e583bed584bd69f2 | have its *own* substitute for ``malloc()`` and ``free()``, and may not want Python's. Right now, CPython works with anything that implements ``malloc()`` and ``free()`` properly.
Why isn't all memory freed when CPython exits? ---------------------------------------------- | trusted_official_docs | CPython Docs | have its *own* substitute for ``malloc()`` and ``free()``, and may not want Python's. Right now, CPython works with anything that implements ``malloc()`` and ``free()`` properly.
Why isn't all memory freed when CPython exits? ---------------------------------------------- | have its *own* substitute for ``malloc()`` and ``free()``, and may not want Python's. Right now, CPython works with anything that implements ``malloc()`` and ``free()`` properly.
Why isn't all memory freed when CPython exits? ---------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
80894ab1-d6de-4807-a6fb-b45672cbfdbc | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,457 | supabase-export-v2 | 7b7beff40cbe5047 | Why doesn't list.sort() return the sorted list? -----------------------------------------------
In situations where performance matters, making a copy of the list just to sort
it would be wasteful. Therefore, :meth:`list.sort` sorts the list in place. In
order to remind you of that fact, it does not return the sorted l... | trusted_official_docs | CPython Docs | Why doesn't list.sort() return the sorted list? -----------------------------------------------
In situations where performance matters, making a copy of the list just to sort
it would be wasteful. Therefore, :meth:`list.sort` sorts the list in place. In
order to remind you of that fact, it does not return the sorted l... | Why doesn't list.sort() return the sorted list? -----------------------------------------------
In situations where performance matters, making a copy of the list just to sort
it would be wasteful. Therefore, :meth:`list.sort` sorts the list in place. In
order to remind you of that fact, it does not return the sorted l... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
815bb1c0-41f8-49be-90ec-38daf6e80344 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,389 | supabase-export-v2 | 0b828146e3b5c261 | is an instruction to a string literal to return the substrings delimited by the given separator (or, by default, arbitrary runs of white space).
:meth:`~str.join` is a string method because in using it you are telling the
separator string to iterate over a sequence of strings and insert itself between
adjacent elements... | trusted_official_docs | CPython Docs | is an instruction to a string literal to return the substrings delimited by the given separator (or, by default, arbitrary runs of white space).
:meth:`~str.join` is a string method because in using it you are telling the
separator string to iterate over a sequence of strings and insert itself between
adjacent elements... | is an instruction to a string literal to return the substrings delimited by the given separator (or, by default, arbitrary runs of white space).
:meth:`~str.join` is a string method because in using it you are telling the
separator string to iterate over a sequence of strings and insert itself between
adjacent elements... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
84e22b4a-5e76-4400-922a-a7aa73c9616f | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,435 | supabase-export-v2 | 877d6bb139ea51ba | This makes indexing a list ``a[i]`` an operation whose cost is independent of the size of the list or the value of the index.
When items are appended or inserted, the array of references is resized. Some
cleverness is applied to improve the performance of appending items repeatedly;
when the array must be grown, some e... | trusted_official_docs | CPython Docs | This makes indexing a list ``a[i]`` an operation whose cost is independent of the size of the list or the value of the index.
When items are appended or inserted, the array of references is resized. Some
cleverness is applied to improve the performance of appending items repeatedly;
when the array must be grown, some e... | This makes indexing a list ``a[i]`` an operation whose cost is independent of the size of the list or the value of the index.
When items are appended or inserted, the array of references is resized. Some
cleverness is applied to improve the performance of appending items repeatedly;
when the array must be grown, some e... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86be2c31-3d36-4c90-b0c0-a8cda43d0e1a | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,350 | supabase-export-v2 | b051ab0f21e4fc50 | processor, to perform floating-point operations. This means that as far as floating-point operations are concerned, Python behaves like many popular languages including C and Java.
Many numbers that can be written easily in decimal notation cannot be expressed
exactly in binary floating point. For example, after:: | trusted_official_docs | CPython Docs | processor, to perform floating-point operations. This means that as far as floating-point operations are concerned, Python behaves like many popular languages including C and Java.
Many numbers that can be written easily in decimal notation cannot be expressed
exactly in binary floating point. For example, after:: | processor, to perform floating-point operations. This means that as far as floating-point operations are concerned, Python behaves like many popular languages including C and Java.
Many numbers that can be written easily in decimal notation cannot be expressed
exactly in binary floating point. For example, after:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
87fd34c7-ff1e-4309-a3af-dadc22e13db5 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,459 | supabase-export-v2 | aff835781b650e3d | list from a provided iterable, sorts it and returns it. For example, here's how to iterate over the keys of a dictionary in sorted order::
for key in sorted(mydict):
... # do whatever with mydict[key]... | trusted_official_docs | CPython Docs | list from a provided iterable, sorts it and returns it. For example, here's how to iterate over the keys of a dictionary in sorted order::
for key in sorted(mydict):
... # do whatever with mydict[key]... | list from a provided iterable, sorts it and returns it. For example, here's how to iterate over the keys of a dictionary in sorted order::
for key in sorted(mydict):
... # do whatever with mydict[key]... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
88e10f35-2bb5-4954-8135-75a29fe4257e | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,475 | supabase-export-v2 | 4f0d43c853a40b2a | precisely, they can't end with an odd number of backslashes: the unpaired backslash at the end escapes the closing quote character, leaving an unterminated string.
Raw strings were designed to ease creating input for processors (chiefly regular
expression engines) that want to do their own backslash escape processing. ... | trusted_official_docs | CPython Docs | precisely, they can't end with an odd number of backslashes: the unpaired backslash at the end escapes the closing quote character, leaving an unterminated string.
Raw strings were designed to ease creating input for processors (chiefly regular
expression engines) that want to do their own backslash escape processing. ... | precisely, they can't end with an odd number of backslashes: the unpaired backslash at the end escapes the closing quote character, leaving an unterminated string.
Raw strings were designed to ease creating input for processors (chiefly regular
expression engines) that want to do their own backslash escape processing. ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
90ba4588-ef6d-4f2a-afa5-1fa5080c8222 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,481 | supabase-export-v2 | a6783b1f1227759e | Why doesn't Python have a "with" statement for attribute assignments? ---------------------------------------------------------------------
Python has a :keyword:`with` statement that wraps the execution of a block, calling code
on the entrance and exit from the block. Some languages have a construct that
looks like th... | trusted_official_docs | CPython Docs | Why doesn't Python have a "with" statement for attribute assignments? ---------------------------------------------------------------------
Python has a :keyword:`with` statement that wraps the execution of a block, calling code
on the entrance and exit from the block. Some languages have a construct that
looks like th... | Why doesn't Python have a "with" statement for attribute assignments? ---------------------------------------------------------------------
Python has a :keyword:`with` statement that wraps the execution of a block, calling code
on the entrance and exit from the block. Some languages have a construct that
looks like th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
915bace1-8b80-475f-befe-ccc2ddaf61e3 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,447 | supabase-export-v2 | b12b1c6460a15174 | work because the list, being a mutable object, could contain a reference to itself, and then the copying code would run into an infinite loop.
- Allow lists as keys but tell the user not to modify them. This would allow a
class of hard-to-track bugs in programs when you forgot or modified a list by
accident. It also ... | trusted_official_docs | CPython Docs | work because the list, being a mutable object, could contain a reference to itself, and then the copying code would run into an infinite loop.
- Allow lists as keys but tell the user not to modify them. This would allow a
class of hard-to-track bugs in programs when you forgot or modified a list by
accident. It also ... | work because the list, being a mutable object, could contain a reference to itself, and then the copying code would run into an infinite loop.
- Allow lists as keys but tell the user not to modify them. This would allow a
class of hard-to-track bugs in programs when you forgot or modified a list by
accident. It also ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9208e24e-1dc7-4639-aeb1-c9c606fb11f6 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,468 | supabase-export-v2 | caa8f09f4e15fc07 | Why is there no goto? ---------------------
In the 1970s people realized that unrestricted goto could lead
to messy "spaghetti" code that was hard to understand and revise. In a high-level language, it is also unneeded as long as there
are ways to branch (in Python, with :keyword:`if` statements and :keyword:`or`,
:key... | trusted_official_docs | CPython Docs | Why is there no goto? ---------------------
In the 1970s people realized that unrestricted goto could lead
to messy "spaghetti" code that was hard to understand and revise. In a high-level language, it is also unneeded as long as there
are ways to branch (in Python, with :keyword:`if` statements and :keyword:`or`,
:key... | Why is there no goto? ---------------------
In the 1970s people realized that unrestricted goto could lead
to messy "spaghetti" code that was hard to understand and revise. In a high-level language, it is also unneeded as long as there
are ways to branch (in Python, with :keyword:`if` statements and :keyword:`or`,
:key... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93d3d20c-572e-41ff-9aed-7c0d1e2b00ea | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,337 | supabase-export-v2 | 3b443565cdbc1337 | Why does Python use indentation for grouping of statements? -----------------------------------------------------------
Guido van Rossum believes that using indentation for grouping is extremely
elegant and contributes a lot to the clarity of the average Python program. Most people learn to love this feature after a wh... | trusted_official_docs | CPython Docs | Why does Python use indentation for grouping of statements? -----------------------------------------------------------
Guido van Rossum believes that using indentation for grouping is extremely
elegant and contributes a lot to the clarity of the average Python program. Most people learn to love this feature after a wh... | Why does Python use indentation for grouping of statements? -----------------------------------------------------------
Guido van Rossum believes that using indentation for grouping is extremely
elegant and contributes a lot to the clarity of the average Python program. Most people learn to love this feature after a wh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
94d1ff4c-b8ee-41b1-838d-942b7330fb9e | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,463 | supabase-export-v2 | 4d7ebd671731a1d5 | whether an instance or a class implements a particular ABC. The :mod:`collections.abc` module defines a set of useful ABCs such as :class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:`~collections.abc.MutableMapping`.
For Python, many of the advantages of interface specifications can be ... | trusted_official_docs | CPython Docs | whether an instance or a class implements a particular ABC. The :mod:`collections.abc` module defines a set of useful ABCs such as :class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:`~collections.abc.MutableMapping`.
For Python, many of the advantages of interface specifications can be ... | whether an instance or a class implements a particular ABC. The :mod:`collections.abc` module defines a set of useful ABCs such as :class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:`~collections.abc.MutableMapping`.
For Python, many of the advantages of interface specifications can be ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b88d1a1-8620-4410-be69-a6b37f206892 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,340 | supabase-export-v2 | 196d23ba81e1e4ab | if (x <= y) x++; y--; z++;
Only the ``x++`` statement is executed if the condition is true, but the
indentation leads many to believe otherwise. Even experienced C programmers will
sometimes stare at it a long time wondering as to why ``y`` is being decremented even
for ``x > y``. | trusted_official_docs | CPython Docs | if (x <= y) x++; y--; z++;
Only the ``x++`` statement is executed if the condition is true, but the
indentation leads many to believe otherwise. Even experienced C programmers will
sometimes stare at it a long time wondering as to why ``y`` is being decremented even
for ``x > y``. | if (x <= y) x++; y--; z++;
Only the ``x++`` statement is executed if the condition is true, but the
indentation leads many to believe otherwise. Even experienced C programmers will
sometimes stare at it a long time wondering as to why ``y`` is being decremented even
for ``x > y``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d558997-2404-49cf-9903-72de7a255881 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,412 | supabase-export-v2 | d14c85fa8966e98c | that's just a local variable to which the function object (which is exactly the same type of object that a lambda expression yields) is assigned!
Can Python be compiled to machine code, C or some other language? ----------------------------------------------------------------- | trusted_official_docs | CPython Docs | that's just a local variable to which the function object (which is exactly the same type of object that a lambda expression yields) is assigned!
Can Python be compiled to machine code, C or some other language? ----------------------------------------------------------------- | that's just a local variable to which the function object (which is exactly the same type of object that a lambda expression yields) is assigned!
Can Python be compiled to machine code, C or some other language? ----------------------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9f655a4f-c825-46c7-a7b0-973b79c27777 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,504 | supabase-export-v2 | 1b8f0bebb152637a | Python lets you add a trailing comma at the end of lists, tuples, and dictionaries::
[1, 2, 3,]
('a', 'b', 'c',)
d = {
"A": [1, 5],
"B": [6, 7], # last trailing comma is optional but good style
} | trusted_official_docs | CPython Docs | Python lets you add a trailing comma at the end of lists, tuples, and dictionaries::
[1, 2, 3,]
('a', 'b', 'c',)
d = {
"A": [1, 5],
"B": [6, 7], # last trailing comma is optional but good style
} | Python lets you add a trailing comma at the end of lists, tuples, and dictionaries::
[1, 2, 3,]
('a', 'b', 'c',)
d = {
"A": [1, 5],
"B": [6, 7], # last trailing comma is optional but good style
} | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a18825e5-3c91-468a-bd9d-5947941f8a54 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,484 | supabase-export-v2 | e80586bd044d2016 | In Python, such a construct would be ambiguous.
Other languages, such as Object Pascal, Delphi, and C++, use static types, so
it's possible to know, in an unambiguous way, what member is being assigned
to. This is the main point of static typing -- the compiler *always* knows the
scope of every variable at compile time... | trusted_official_docs | CPython Docs | In Python, such a construct would be ambiguous.
Other languages, such as Object Pascal, Delphi, and C++, use static types, so
it's possible to know, in an unambiguous way, what member is being assigned
to. This is the main point of static typing -- the compiler *always* knows the
scope of every variable at compile time... | In Python, such a construct would be ambiguous.
Other languages, such as Object Pascal, Delphi, and C++, use static types, so
it's possible to know, in an unambiguous way, what member is being assigned
to. This is the main point of static typing -- the compiler *always* knows the
scope of every variable at compile time... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a2253983-3473-41d9-b85e-8bbceb2f5504 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,419 | supabase-export-v2 | 8ea5598b5c3f5f45 | for file in very_long_list_of_files: f = open(file) c = f.read(1)
Indeed, using CPython's reference counting and destructor scheme, each new
assignment to ``f`` closes the previous file. With a traditional GC, however,
those file objects will only get collected (and closed) at varying and possibly
long intervals. | trusted_official_docs | CPython Docs | for file in very_long_list_of_files: f = open(file) c = f.read(1)
Indeed, using CPython's reference counting and destructor scheme, each new
assignment to ``f`` closes the previous file. With a traditional GC, however,
those file objects will only get collected (and closed) at varying and possibly
long intervals. | for file in very_long_list_of_files: f = open(file) c = f.read(1)
Indeed, using CPython's reference counting and destructor scheme, each new
assignment to ``f`` closes the previous file. With a traditional GC, however,
those file objects will only get collected (and closed) at varying and possibly
long intervals. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a4ada4db-61ac-4ca4-b59c-ff31cfc5e021 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,365 | supabase-export-v2 | 7c2d3b052da83db4 | The idea was borrowed from Modula-3. It turns out to be very useful, for a variety of reasons.
First, it's more obvious that you are using a method or instance attribute
instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it
absolutely clear that an instance variable or method is used even if you d... | trusted_official_docs | CPython Docs | The idea was borrowed from Modula-3. It turns out to be very useful, for a variety of reasons.
First, it's more obvious that you are using a method or instance attribute
instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it
absolutely clear that an instance variable or method is used even if you d... | The idea was borrowed from Modula-3. It turns out to be very useful, for a variety of reasons.
First, it's more obvious that you are using a method or instance attribute
instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it
absolutely clear that an instance variable or method is used even if you d... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a5943393-ce59-49a5-97cf-e4b657cd144e | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,357 | supabase-export-v2 | 2aac48b16d05eb8b | The typical precision of 53 bits provides Python floats with 15--16 decimal digits of accuracy.
For a fuller explanation, please see the :ref:`floating-point arithmetic
<tut-fp-issues>` chapter in the Python tutorial. | trusted_official_docs | CPython Docs | The typical precision of 53 bits provides Python floats with 15--16 decimal digits of accuracy.
For a fuller explanation, please see the :ref:`floating-point arithmetic
<tut-fp-issues>` chapter in the Python tutorial. | The typical precision of 53 bits provides Python floats with 15--16 decimal digits of accuracy.
For a fuller explanation, please see the :ref:`floating-point arithmetic
<tut-fp-issues>` chapter in the Python tutorial. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7249625-c6d8-4278-a4f1-2ce983232256 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,408 | supabase-export-v2 | 681279df7f323e0f | each Python stack frame. Also, extensions can call back into Python at almost random moments. Therefore, a complete threads implementation requires thread support for C.
Answer 2: Fortunately, there is `Stackless Python <https://github.com/stackless-dev/stackless/wiki>`_,
which has a completely redesigned interpreter l... | trusted_official_docs | CPython Docs | each Python stack frame. Also, extensions can call back into Python at almost random moments. Therefore, a complete threads implementation requires thread support for C.
Answer 2: Fortunately, there is `Stackless Python <https://github.com/stackless-dev/stackless/wiki>`_,
which has a completely redesigned interpreter l... | each Python stack frame. Also, extensions can call back into Python at almost random moments. Therefore, a complete threads implementation requires thread support for C.
Answer 2: Fortunately, there is `Stackless Python <https://github.com/stackless-dev/stackless/wiki>`_,
which has a completely redesigned interpreter l... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a8d614aa-4742-495c-8a37-93f19afcee61 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,449 | supabase-export-v2 | 07972dd4fa354d39 | a key into a dictionary would require marking all objects reachable from there as read-only -- and again, self-referential objects could cause an infinite loop.
There is a trick to get around this if you need to, but use it at your own risk:
You can wrap a mutable structure inside a class instance which has both a
:met... | trusted_official_docs | CPython Docs | a key into a dictionary would require marking all objects reachable from there as read-only -- and again, self-referential objects could cause an infinite loop.
There is a trick to get around this if you need to, but use it at your own risk:
You can wrap a mutable structure inside a class instance which has both a
:met... | a key into a dictionary would require marking all objects reachable from there as read-only -- and again, self-referential objects could cause an infinite loop.
There is a trick to get around this if you need to, but use it at your own risk:
You can wrap a mutable structure inside a class instance which has both a
:met... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ae7f4991-2930-4174-8ee7-c4d5b81f2775 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,458 | supabase-export-v2 | b23bf137ce38c4a4 | way, you won't be fooled into accidentally overwriting a list when you need a sorted copy but also need to keep the unsorted version around.
If you want to return a new list, use the built-in :func:`sorted` function
instead. This function creates a new list from a provided iterable, sorts
it and returns it. For example... | trusted_official_docs | CPython Docs | way, you won't be fooled into accidentally overwriting a list when you need a sorted copy but also need to keep the unsorted version around.
If you want to return a new list, use the built-in :func:`sorted` function
instead. This function creates a new list from a provided iterable, sorts
it and returns it. For example... | way, you won't be fooled into accidentally overwriting a list when you need a sorted copy but also need to keep the unsorted version around.
If you want to return a new list, use the built-in :func:`sorted` function
instead. This function creates a new list from a provided iterable, sorts
it and returns it. For example... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aef8f986-273e-413f-abb9-24f8b3bce568 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,446 | supabase-export-v2 | eec89fedb16ecc6c | used in the second line differs from that in the first line. In other words, dictionary keys should be compared using ``==``, not using :keyword:`is`.
- Make a copy when using a list as a key. This doesn't work because the list,
being a mutable object, could contain a reference to itself, and then the
copying code wo... | trusted_official_docs | CPython Docs | used in the second line differs from that in the first line. In other words, dictionary keys should be compared using ``==``, not using :keyword:`is`.
- Make a copy when using a list as a key. This doesn't work because the list,
being a mutable object, could contain a reference to itself, and then the
copying code wo... | used in the second line differs from that in the first line. In other words, dictionary keys should be compared using ``==``, not using :keyword:`is`.
- Make a copy when using a list as a key. This doesn't work because the list,
being a mutable object, could contain a reference to itself, and then the
copying code wo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b030397f-8c14-47e5-a6fb-1dc0196cb312 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,382 | supabase-export-v2 | 6c54db7b3ea1f25f | of the string module. Most of these new methods have been widely accepted, but the one which appears to make some programmers feel uncomfortable is::
", ".join(['1', '2', '4', '8', '16']) | trusted_official_docs | CPython Docs | of the string module. Most of these new methods have been widely accepted, but the one which appears to make some programmers feel uncomfortable is::
", ".join(['1', '2', '4', '8', '16']) | of the string module. Most of these new methods have been widely accepted, but the one which appears to make some programmers feel uncomfortable is::
", ".join(['1', '2', '4', '8', '16']) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b0728ece-b158-4062-ba7f-1fa0cacd7534 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,405 | supabase-export-v2 | 12bbf248775d1100 | example. Without such a prefix, if values are coming from an untrusted source, an attacker would be able to call any method on your object.
Imitating switch with fallthrough, as with C's switch-case-default,
is possible, much harder, and less needed. | trusted_official_docs | CPython Docs | example. Without such a prefix, if values are coming from an untrusted source, an attacker would be able to call any method on your object.
Imitating switch with fallthrough, as with C's switch-case-default,
is possible, much harder, and less needed. | example. Without such a prefix, if values are coming from an untrusted source, an attacker would be able to call any method on your object.
Imitating switch with fallthrough, as with C's switch-case-default,
is possible, much harder, and less needed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b6a1ee64-e45f-4182-847f-821e9696657f | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,461 | supabase-export-v2 | af7801819ef8c42b | How do you specify and enforce an interface spec in Python? -----------------------------------------------------------
An interface specification for a module as provided by languages such as C++ and
Java describes the prototypes for the methods and functions of the module. Many
feel that compile-time enforcement of i... | trusted_official_docs | CPython Docs | How do you specify and enforce an interface spec in Python? -----------------------------------------------------------
An interface specification for a module as provided by languages such as C++ and
Java describes the prototypes for the methods and functions of the module. Many
feel that compile-time enforcement of i... | How do you specify and enforce an interface spec in Python? -----------------------------------------------------------
An interface specification for a module as provided by languages such as C++ and
Java describes the prototypes for the methods and functions of the module. Many
feel that compile-time enforcement of i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b895c4b4-1748-4ac2-a5f2-1cf1d0ed34f0 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,430 | supabase-export-v2 | 01023f4cc40bfc99 | different types which are operated on as a group. For example, a Cartesian coordinate is appropriately represented as a tuple of two or three numbers.
Lists, on the other hand, are more like arrays in other languages. They tend to
hold a varying number of objects all of which have the same type and which are
operated o... | trusted_official_docs | CPython Docs | different types which are operated on as a group. For example, a Cartesian coordinate is appropriately represented as a tuple of two or three numbers.
Lists, on the other hand, are more like arrays in other languages. They tend to
hold a varying number of objects all of which have the same type and which are
operated o... | different types which are operated on as a group. For example, a Cartesian coordinate is appropriately represented as a tuple of two or three numbers.
Lists, on the other hand, are more like arrays in other languages. They tend to
hold a varying number of objects all of which have the same type and which are
operated o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b922e27f-8fea-4474-9cc5-98ec00693bde | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,437 | supabase-export-v2 | 5eb9dda661e61630 | How are dictionaries implemented in CPython? --------------------------------------------
CPython's dictionaries are implemented as resizable hash tables. Compared to
B-trees, this gives better performance for lookup (the most common operation by
far) under most circumstances, and the implementation is simpler. | trusted_official_docs | CPython Docs | How are dictionaries implemented in CPython? --------------------------------------------
CPython's dictionaries are implemented as resizable hash tables. Compared to
B-trees, this gives better performance for lookup (the most common operation by
far) under most circumstances, and the implementation is simpler. | How are dictionaries implemented in CPython? --------------------------------------------
CPython's dictionaries are implemented as resizable hash tables. Compared to
B-trees, this gives better performance for lookup (the most common operation by
far) under most circumstances, and the implementation is simpler. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ba27b137-6fd5-41dd-85e3-48535d876dc2 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,474 | supabase-export-v2 | b3e8ab83f88df240 | Why can't raw strings (r-strings) end with a backslash? -------------------------------------------------------
More precisely, they can't end with an odd number of backslashes: the unpaired
backslash at the end escapes the closing quote character, leaving an
unterminated string. | trusted_official_docs | CPython Docs | Why can't raw strings (r-strings) end with a backslash? -------------------------------------------------------
More precisely, they can't end with an odd number of backslashes: the unpaired
backslash at the end escapes the closing quote character, leaving an
unterminated string. | Why can't raw strings (r-strings) end with a backslash? -------------------------------------------------------
More precisely, they can't end with an odd number of backslashes: the unpaired
backslash at the end escapes the closing quote character, leaving an
unterminated string. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bd8fec63-0e31-4c67-bb1f-d73dac53c520 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,441 | supabase-export-v2 | 753e653d20d7dde0 | to look up the old value it wouldn't be found either, because the value of the object found in that hash bin would be different.
If you want a dictionary indexed with a list, simply convert the list to a tuple
first; the function ``tuple(L)`` creates a tuple with the same entries as the
list ``L``. Tuples are immutable... | trusted_official_docs | CPython Docs | to look up the old value it wouldn't be found either, because the value of the object found in that hash bin would be different.
If you want a dictionary indexed with a list, simply convert the list to a tuple
first; the function ``tuple(L)`` creates a tuple with the same entries as the
list ``L``. Tuples are immutable... | to look up the old value it wouldn't be found either, because the value of the object found in that hash bin would be different.
If you want a dictionary indexed with a list, simply convert the list to a tuple
first; the function ``tuple(L)`` creates a tuple with the same entries as the
list ``L``. Tuples are immutable... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bf94dc83-e702-467f-8652-18fa48e3209a | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,387 | supabase-export-v2 | ff169bc0cb94dc05 | there seems to be much less difficulty with having :meth:`~str.split` as a string method, since in that case it is easy to see that ::
"1, 2, 4, 8, 16".split(", ") | trusted_official_docs | CPython Docs | there seems to be much less difficulty with having :meth:`~str.split` as a string method, since in that case it is easy to see that ::
"1, 2, 4, 8, 16".split(", ") | there seems to be much less difficulty with having :meth:`~str.split` as a string method, since in that case it is easy to see that ::
"1, 2, 4, 8, 16".split(", ") | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c0f9937e-5d2b-412f-aa17-88ec0003085f | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,464 | supabase-export-v2 | 17f1b73546b1e366 | For Python, many of the advantages of interface specifications can be obtained by an appropriate test discipline for components.
A good test suite for a module can both provide a regression test and serve as a
module interface specification and a set of examples. Many Python modules can
be run as a script to provide a ... | trusted_official_docs | CPython Docs | For Python, many of the advantages of interface specifications can be obtained by an appropriate test discipline for components.
A good test suite for a module can both provide a regression test and serve as a
module interface specification and a set of examples. Many Python modules can
be run as a script to provide a ... | For Python, many of the advantages of interface specifications can be obtained by an appropriate test discipline for components.
A good test suite for a module can both provide a regression test and serve as a
module interface specification and a set of examples. Many Python modules can
be run as a script to provide a ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c12cbae8-aa49-4273-bcd0-6e742f0db5a0 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,443 | supabase-export-v2 | ef1a1a2dc947aa7e | Some unacceptable solutions that have been proposed:
- Hash lists by their address (object ID). This doesn't work because if you
construct a new list with the same value it won't be found; e.g.:: | trusted_official_docs | CPython Docs | Some unacceptable solutions that have been proposed:
- Hash lists by their address (object ID). This doesn't work because if you
construct a new list with the same value it won't be found; e.g.:: | Some unacceptable solutions that have been proposed:
- Hash lists by their address (object ID). This doesn't work because if you
construct a new list with the same value it won't be found; e.g.:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c3c9361d-b2e9-49ef-8292-375222638ab3 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,440 | supabase-export-v2 | 8feea1f022f48e3c | Why must dictionary keys be immutable? --------------------------------------
The hash table implementation of dictionaries uses a hash value calculated from
the key value to find the key. If the key were a mutable object, its value
could change, and thus its hash could also change. But since whoever changes
the key ob... | trusted_official_docs | CPython Docs | Why must dictionary keys be immutable? --------------------------------------
The hash table implementation of dictionaries uses a hash value calculated from
the key value to find the key. If the key were a mutable object, its value
could change, and thus its hash could also change. But since whoever changes
the key ob... | Why must dictionary keys be immutable? --------------------------------------
The hash table implementation of dictionaries uses a hash value calculated from
the key value to find the key. If the key were a mutable object, its value
could change, and thus its hash could also change. But since whoever changes
the key ob... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c76fa50d-a035-420b-b727-a8a18885ee90 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,490 | supabase-export-v2 | 415d3c64adc454a6 | The primary benefit of :keyword:`with` and similar language features (reduction of code volume) can, however, easily be achieved in Python by assignment. Instead of::
function(args).mydict[index][index].a = 21
function(args).mydict[index][index].b = 42
function(args).mydict[index][index].c = 63 | trusted_official_docs | CPython Docs | The primary benefit of :keyword:`with` and similar language features (reduction of code volume) can, however, easily be achieved in Python by assignment. Instead of::
function(args).mydict[index][index].a = 21
function(args).mydict[index][index].b = 42
function(args).mydict[index][index].c = 63 | The primary benefit of :keyword:`with` and similar language features (reduction of code volume) can, however, easily be achieved in Python by assignment. Instead of::
function(args).mydict[index][index].a = 21
function(args).mydict[index][index].b = 42
function(args).mydict[index][index].c = 63 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cd5db539-1aec-4d34-95da-693ae6ce4031 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,485 | supabase-export-v2 | 400e81100ca605a1 | is being assigned to. This is the main point of static typing -- the compiler *always* knows the scope of every variable at compile time.
Python uses dynamic types. It is impossible to know in advance which attribute
will be referenced at runtime. Member attributes may be added or removed from
objects on the fly. This ... | trusted_official_docs | CPython Docs | is being assigned to. This is the main point of static typing -- the compiler *always* knows the scope of every variable at compile time.
Python uses dynamic types. It is impossible to know in advance which attribute
will be referenced at runtime. Member attributes may be added or removed from
objects on the fly. This ... | is being assigned to. This is the main point of static typing -- the compiler *always* knows the scope of every variable at compile time.
Python uses dynamic types. It is impossible to know in advance which attribute
will be referenced at runtime. Member attributes may be added or removed from
objects on the fly. This ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cdc6181c-abfe-4df3-baa0-94858388b7db | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,482 | supabase-export-v2 | c153c126875fb8a5 | wraps the execution of a block, calling code on the entrance and exit from the block. Some languages have a construct that looks like this::
with obj:
a = 1 # equivalent to obj.a = 1
total = total + 1 # obj.total = obj.total + 1 | trusted_official_docs | CPython Docs | wraps the execution of a block, calling code on the entrance and exit from the block. Some languages have a construct that looks like this::
with obj:
a = 1 # equivalent to obj.a = 1
total = total + 1 # obj.total = obj.total + 1 | wraps the execution of a block, calling code on the entrance and exit from the block. Some languages have a construct that looks like this::
with obj:
a = 1 # equivalent to obj.a = 1
total = total + 1 # obj.total = obj.total + 1 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ce16c37e-9743-4c47-bad5-66e16ef4d02c | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,368 | supabase-export-v2 | 23b0403e333d0212 | Similarly, for using instance variables, having to write ``self.var`` means that references to unqualified names inside a method don't have to search the instance's directories.
To put it another way, local
variables and instance variables live in two different namespaces, and you need
to tell Python which namespace to... | trusted_official_docs | CPython Docs | Similarly, for using instance variables, having to write ``self.var`` means that references to unqualified names inside a method don't have to search the instance's directories.
To put it another way, local
variables and instance variables live in two different namespaces, and you need
to tell Python which namespace to... | Similarly, for using instance variables, having to write ``self.var`` means that references to unqualified names inside a method don't have to search the instance's directories.
To put it another way, local
variables and instance variables live in two different namespaces, and you need
to tell Python which namespace to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d5e9c7c1-b3de-4f74-bf15-227d794acf84 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,476 | supabase-export-v2 | aa97c84ff622daf6 | to pass on the string quote character by escaping it with a backslash. These rules work well when r-strings are used for their intended purpose.
If you're trying to build Windows pathnames, note that all Windows system calls
accept forward slashes too:: | trusted_official_docs | CPython Docs | to pass on the string quote character by escaping it with a backslash. These rules work well when r-strings are used for their intended purpose.
If you're trying to build Windows pathnames, note that all Windows system calls
accept forward slashes too:: | to pass on the string quote character by escaping it with a backslash. These rules work well when r-strings are used for their intended purpose.
If you're trying to build Windows pathnames, note that all Windows system calls
accept forward slashes too:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d979bca6-b73c-415b-bea1-20a7cfaf9297 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,495 | supabase-export-v2 | 845403a0f93a9060 | proposals that would introduce syntax to further reduce code volume, such as using a 'leading dot', have been rejected in favour of explicitness (see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html).
Why don't generators support the with statement? ------------------------------------------------ | trusted_official_docs | CPython Docs | proposals that would introduce syntax to further reduce code volume, such as using a 'leading dot', have been rejected in favour of explicitness (see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html).
Why don't generators support the with statement? ------------------------------------------------ | proposals that would introduce syntax to further reduce code volume, such as using a 'leading dot', have been rejected in favour of explicitness (see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html).
Why don't generators support the with statement? ------------------------------------------------ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d9ceb25b-4a1a-42dd-9589-a7b68647f116 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,509 | supabase-export-v2 | 74cd4091876f0bb1 | x = [ "fee", "fie" "foo", "fum" ]
This list looks like it has four elements, but it actually contains three:
"fee", "fiefoo" and "fum". Always adding the comma avoids this source of error. | trusted_official_docs | CPython Docs | x = [ "fee", "fie" "foo", "fum" ]
This list looks like it has four elements, but it actually contains three:
"fee", "fiefoo" and "fum". Always adding the comma avoids this source of error. | x = [ "fee", "fie" "foo", "fum" ]
This list looks like it has four elements, but it actually contains three:
"fee", "fiefoo" and "fum". Always adding the comma avoids this source of error. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dc36d500-52ae-43b7-8e2d-9a512720f93c | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,431 | supabase-export-v2 | ed259012ad0368aa | files in the current directory. Functions which operate on this output would generally not break if you added another file or two to the directory.
Tuples are :term:`immutable`, meaning that once a tuple has been created, you can't
replace any of its elements with a new value. Lists are :term:`mutable`, meaning that
yo... | trusted_official_docs | CPython Docs | files in the current directory. Functions which operate on this output would generally not break if you added another file or two to the directory.
Tuples are :term:`immutable`, meaning that once a tuple has been created, you can't
replace any of its elements with a new value. Lists are :term:`mutable`, meaning that
yo... | files in the current directory. Functions which operate on this output would generally not break if you added another file or two to the directory.
Tuples are :term:`immutable`, meaning that once a tuple has been created, you can't
replace any of its elements with a new value. Lists are :term:`mutable`, meaning that
yo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
de15b89c-eec8-4d19-b4f5-0044f7a156fb | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,411 | supabase-export-v2 | c694374c749b24f1 | Unlike lambda forms in other languages, where they add functionality, Python lambdas are only a shorthand notation if you're too lazy to define a function.
Functions are already first class objects in Python, and can be declared in a
local scope. Therefore the only advantage of using a lambda instead of a
locally defin... | trusted_official_docs | CPython Docs | Unlike lambda forms in other languages, where they add functionality, Python lambdas are only a shorthand notation if you're too lazy to define a function.
Functions are already first class objects in Python, and can be declared in a
local scope. Therefore the only advantage of using a lambda instead of a
locally defin... | Unlike lambda forms in other languages, where they add functionality, Python lambdas are only a shorthand notation if you're too lazy to define a function.
Functions are already first class objects in Python, and can be declared in a
local scope. Therefore the only advantage of using a lambda instead of a
locally defin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e077ca71-3f3a-49f1-8f02-d75ecbef4cca | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,341 | supabase-export-v2 | 64088d959fb0a23e | Even experienced C programmers will sometimes stare at it a long time wondering as to why ``y`` is being decremented even for ``x > y``.
Because there are no begin/end brackets, Python is much less prone to
coding-style conflicts. In C there are many different ways to place the braces. After becoming used to reading an... | trusted_official_docs | CPython Docs | Even experienced C programmers will sometimes stare at it a long time wondering as to why ``y`` is being decremented even for ``x > y``.
Because there are no begin/end brackets, Python is much less prone to
coding-style conflicts. In C there are many different ways to place the braces. After becoming used to reading an... | Even experienced C programmers will sometimes stare at it a long time wondering as to why ``y`` is being decremented even for ``x > y``.
Because there are no begin/end brackets, Python is much less prone to
coding-style conflicts. In C there are many different ways to place the braces. After becoming used to reading an... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e1e48008-ee1f-4810-8619-4eeb7832ec7b | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,393 | supabase-export-v2 | 1a101366e79845a6 | try: value = mydict[key] except KeyError: mydict[key] = getvalue(key) value = mydict[key]
This only made sense when you expected the dict to have the key almost all the
time. If that wasn't the case, you coded it like this:: | trusted_official_docs | CPython Docs | try: value = mydict[key] except KeyError: mydict[key] = getvalue(key) value = mydict[key]
This only made sense when you expected the dict to have the key almost all the
time. If that wasn't the case, you coded it like this:: | try: value = mydict[key] except KeyError: mydict[key] = getvalue(key) value = mydict[key]
This only made sense when you expected the dict to have the key almost all the
time. If that wasn't the case, you coded it like this:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4633456-a5f2-40bb-8fdc-8c34d49437d0 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,444 | supabase-export-v2 | 7b6492b0a12dfc21 | lists by their address (object ID). This doesn't work because if you construct a new list with the same value it won't be found; e.g.::
mydict = {[1, 2]: '12'}
print(mydict[[1, 2]]) | trusted_official_docs | CPython Docs | lists by their address (object ID). This doesn't work because if you construct a new list with the same value it won't be found; e.g.::
mydict = {[1, 2]: '12'}
print(mydict[[1, 2]]) | lists by their address (object ID). This doesn't work because if you construct a new list with the same value it won't be found; e.g.::
mydict = {[1, 2]: '12'}
print(mydict[[1, 2]]) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ee3a350f-1cdb-418a-9a7c-6050a5860fd7 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,339 | supabase-export-v2 | ac1d895aeacb633f | cannot be a disagreement between grouping perceived by the parser and the human reader. Occasionally C programmers will encounter a fragment of code like this::
if (x <= y)
x++;
y--;
z++; | trusted_official_docs | CPython Docs | cannot be a disagreement between grouping perceived by the parser and the human reader. Occasionally C programmers will encounter a fragment of code like this::
if (x <= y)
x++;
y--;
z++; | cannot be a disagreement between grouping perceived by the parser and the human reader. Occasionally C programmers will encounter a fragment of code like this::
if (x <= y)
x++;
y--;
z++; | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eee53468-2032-4039-aeed-6b1a4fe61bef | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,455 | supabase-export-v2 | 82e01b3ba6e99d94 | of whether the object is in a dictionary or not. If you fail to meet these restrictions dictionaries and other hash based structures will misbehave.
In the case of :class:`!ListWrapper`, whenever the wrapper object is in a dictionary the
wrapped list must not change to avoid anomalies. Don't do this unless you are
prep... | trusted_official_docs | CPython Docs | of whether the object is in a dictionary or not. If you fail to meet these restrictions dictionaries and other hash based structures will misbehave.
In the case of :class:`!ListWrapper`, whenever the wrapper object is in a dictionary the
wrapped list must not change to avoid anomalies. Don't do this unless you are
prep... | of whether the object is in a dictionary or not. If you fail to meet these restrictions dictionaries and other hash based structures will misbehave.
In the case of :class:`!ListWrapper`, whenever the wrapper object is in a dictionary the
wrapped list must not change to avoid anomalies. Don't do this unless you are
prep... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f17ecbba-18e6-4a53-8115-f94cbebbd2c5 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,399 | supabase-export-v2 | 273d75011e6c6164 | you need to choose from a very large number of possibilities, you can create a dictionary mapping case values to functions to call. For example::
functions = {'a': function_1,
'b': function_2,
'c': self.method_1} | trusted_official_docs | CPython Docs | you need to choose from a very large number of possibilities, you can create a dictionary mapping case values to functions to call. For example::
functions = {'a': function_1,
'b': function_2,
'c': self.method_1} | you need to choose from a very large number of possibilities, you can create a dictionary mapping case values to functions to call. For example::
functions = {'a': function_1,
'b': function_2,
'c': self.method_1} | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f296c700-8067-4a9d-bafc-5ba58677ca86 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,349 | supabase-export-v2 | c678670e05f25d56 | bug in Python. It's not. This has little to do with Python, and much more to do with how the underlying platform handles floating-point numbers.
The :class:`float` type in CPython uses a C ``double`` for storage. A
:class:`float` object's value is stored in binary floating-point with a fixed
precision (typically 53 bit... | trusted_official_docs | CPython Docs | bug in Python. It's not. This has little to do with Python, and much more to do with how the underlying platform handles floating-point numbers.
The :class:`float` type in CPython uses a C ``double`` for storage. A
:class:`float` object's value is stored in binary floating-point with a fixed
precision (typically 53 bit... | bug in Python. It's not. This has little to do with Python, and much more to do with how the underlying platform handles floating-point numbers.
The :class:`float` type in CPython uses a C ``double`` for storage. A
:class:`float` object's value is stored in binary floating-point with a fixed
precision (typically 53 bit... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f62a2c21-7e4b-4c4c-881e-a02f0da7d86c | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,502 | supabase-export-v2 | 2ab6b70ac703364a | can look for colons to decide when indentation needs to be increased instead of having to do a more elaborate parsing of the program text.
Why does Python allow commas at the end of lists and tuples? ------------------------------------------------------------ | trusted_official_docs | CPython Docs | can look for colons to decide when indentation needs to be increased instead of having to do a more elaborate parsing of the program text.
Why does Python allow commas at the end of lists and tuples? ------------------------------------------------------------ | can look for colons to decide when indentation needs to be increased instead of having to do a more elaborate parsing of the program text.
Why does Python allow commas at the end of lists and tuples? ------------------------------------------------------------ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f7ee5083-a99d-4e53-886f-870fb5b33e2d | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,417 | supabase-export-v2 | e1cbf79632117381 | a full-blown garbage collector. This difference can cause some subtle porting problems if your Python code depends on the behavior of the reference counting implementation.
In some Python implementations, the following code (which is fine in CPython)
will probably run out of file descriptors:: | trusted_official_docs | CPython Docs | a full-blown garbage collector. This difference can cause some subtle porting problems if your Python code depends on the behavior of the reference counting implementation.
In some Python implementations, the following code (which is fine in CPython)
will probably run out of file descriptors:: | a full-blown garbage collector. This difference can cause some subtle porting problems if your Python code depends on the behavior of the reference counting implementation.
In some Python implementations, the following code (which is fine in CPython)
will probably run out of file descriptors:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f883b309-bc91-4288-b1f2-8fc1358688c1 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,450 | supabase-export-v2 | 6f879cc6a3834e21 | wrapper objects that reside in a dictionary (or other hash based structure), remain fixed while the object is in the dictionary (or other structure). ::
class ListWrapper:
def __init__(self, the_list):
self.the_list = the_list | trusted_official_docs | CPython Docs | wrapper objects that reside in a dictionary (or other hash based structure), remain fixed while the object is in the dictionary (or other structure). ::
class ListWrapper:
def __init__(self, the_list):
self.the_list = the_list | wrapper objects that reside in a dictionary (or other hash based structure), remain fixed while the object is in the dictionary (or other structure). ::
class ListWrapper:
def __init__(self, the_list):
self.the_list = the_list | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8f2b101-0fa9-4655-89b6-4d3d5d4561df | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,472 | supabase-export-v2 | 818189a10d9c997d | try: ... if condition: raise label() # goto label ... except label: # where to goto pass ...
This doesn't allow you to jump into the middle of a loop, but that's usually
considered an abuse of ``goto`` anyway. Use sparingly. | trusted_official_docs | CPython Docs | try: ... if condition: raise label() # goto label ... except label: # where to goto pass ...
This doesn't allow you to jump into the middle of a loop, but that's usually
considered an abuse of ``goto`` anyway. Use sparingly. | try: ... if condition: raise label() # goto label ... except label: # where to goto pass ...
This doesn't allow you to jump into the middle of a loop, but that's usually
considered an abuse of ``goto`` anyway. Use sparingly. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f911796c-e79a-4609-8c93-26be29a88d48 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,386 | supabase-export-v2 | f3df687ae37133ad | fixed value. If the methods are to be allowed on names bound to strings there is no logical reason to make them unavailable on literals.
The second objection is typically cast as: "I am really telling a sequence to
join its members together with a string constant". Sadly, you aren't. For some
reason there seems to be m... | trusted_official_docs | CPython Docs | fixed value. If the methods are to be allowed on names bound to strings there is no logical reason to make them unavailable on literals.
The second objection is typically cast as: "I am really telling a sequence to
join its members together with a string constant". Sadly, you aren't. For some
reason there seems to be m... | fixed value. If the methods are to be allowed on names bound to strings there is no logical reason to make them unavailable on literals.
The second objection is typically cast as: "I am really telling a sequence to
join its members together with a string constant". Sadly, you aren't. For some
reason there seems to be m... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fc6b803f-d818-479c-8063-c6a7321d80b2 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,473 | supabase-export-v2 | a0d1e68f4d8b3ad3 | This doesn't allow you to jump into the middle of a loop, but that's usually considered an abuse of ``goto`` anyway. Use sparingly.
Why can't raw strings (r-strings) end with a backslash? ------------------------------------------------------- | trusted_official_docs | CPython Docs | This doesn't allow you to jump into the middle of a loop, but that's usually considered an abuse of ``goto`` anyway. Use sparingly.
Why can't raw strings (r-strings) end with a backslash? ------------------------------------------------------- | This doesn't allow you to jump into the middle of a loop, but that's usually considered an abuse of ``goto`` anyway. Use sparingly.
Why can't raw strings (r-strings) end with a backslash? ------------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd2d1a50-1529-4ba5-bd20-b015bbbe04c2 | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,364 | supabase-export-v2 | 45d5c22363d07120 | Why must 'self' be used explicitly in method definitions and calls? -------------------------------------------------------------------
The idea was borrowed from Modula-3. It turns out to be very useful, for a
variety of reasons. | trusted_official_docs | CPython Docs | Why must 'self' be used explicitly in method definitions and calls? -------------------------------------------------------------------
The idea was borrowed from Modula-3. It turns out to be very useful, for a
variety of reasons. | Why must 'self' be used explicitly in method definitions and calls? -------------------------------------------------------------------
The idea was borrowed from Modula-3. It turns out to be very useful, for a
variety of reasons. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdb23c56-a6cd-412f-b80f-8ead3cff792e | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,439 | supabase-export-v2 | 943ad05d61e0f71e | keys that all have different hash values, this means that dictionaries take constant time -- *O*\ (1), in Big-O notation -- to retrieve a key.
Why must dictionary keys be immutable? -------------------------------------- | trusted_official_docs | CPython Docs | keys that all have different hash values, this means that dictionaries take constant time -- *O*\ (1), in Big-O notation -- to retrieve a key.
Why must dictionary keys be immutable? -------------------------------------- | keys that all have different hash values, this means that dictionaries take constant time -- *O*\ (1), in Big-O notation -- to retrieve a key.
Why must dictionary keys be immutable? -------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fea0b24e-1dc1-420e-bfa5-2c1cc6c121ba | CPython Docs | file://datasets/cpython/Doc/faq/design.rst | unknown | 411c1525-6760-4db2-85f2-d72432bcf885 | 2,500 | supabase-export-v2 | cd3c7e4b4baf140a | if a == b: print(a)
Notice how the second one is slightly easier to read. Notice further how a
colon sets off the example in this FAQ answer; it's a standard usage in English. | trusted_official_docs | CPython Docs | if a == b: print(a)
Notice how the second one is slightly easier to read. Notice further how a
colon sets off the example in this FAQ answer; it's a standard usage in English. | if a == b: print(a)
Notice how the second one is slightly easier to read. Notice further how a
colon sets off the example in this FAQ answer; it's a standard usage in English. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3105e581-1c88-46de-a9aa-5bbbe3c99cae | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,517 | supabase-export-v2 | 96e673c523754c7c | If you find Python installed on your system but don't remember installing it, there are several possible ways it could have gotten there.
* Perhaps another user on the computer wanted to learn programming and installed
it; you'll have to figure out who's been using the machine and might have
installed it. * A third-p... | trusted_official_docs | CPython Docs | If you find Python installed on your system but don't remember installing it, there are several possible ways it could have gotten there.
* Perhaps another user on the computer wanted to learn programming and installed
it; you'll have to figure out who's been using the machine and might have
installed it. * A third-p... | If you find Python installed on your system but don't remember installing it, there are several possible ways it could have gotten there.
* Perhaps another user on the computer wanted to learn programming and installed
it; you'll have to figure out who's been using the machine and might have
installed it. * A third-p... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
396b990c-1328-447d-ba23-036dee15671c | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,521 | supabase-export-v2 | 8b94125e0758acc4 | If someone installed it deliberately, you can remove it without hurting anything. On Windows, use the Add/Remove Programs icon in the Control Panel.
If Python was installed by a third-party application, you can also remove it,
but that application will no longer work. You should use that application's
uninstaller rathe... | trusted_official_docs | CPython Docs | If someone installed it deliberately, you can remove it without hurting anything. On Windows, use the Add/Remove Programs icon in the Control Panel.
If Python was installed by a third-party application, you can also remove it,
but that application will no longer work. You should use that application's
uninstaller rathe... | If someone installed it deliberately, you can remove it without hurting anything. On Windows, use the Add/Remove Programs icon in the Control Panel.
If Python was installed by a third-party application, you can also remove it,
but that application will no longer work. You should use that application's
uninstaller rathe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d4ac625-b7eb-4be9-8fc9-40b968754449 | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,518 | supabase-export-v2 | 48ce43a0d53469b7 | in Python. * Many Unix-compatible operating systems, such as macOS and some Linux distributions, have Python installed by default; it's included in the base installation.
Can I delete Python? -------------------- | trusted_official_docs | CPython Docs | in Python. * Many Unix-compatible operating systems, such as macOS and some Linux distributions, have Python installed by default; it's included in the base installation.
Can I delete Python? -------------------- | in Python. * Many Unix-compatible operating systems, such as macOS and some Linux distributions, have Python installed by default; it's included in the base installation.
Can I delete Python? -------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6480c564-7659-441a-9627-d8482673b48e | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,520 | supabase-export-v2 | 6ae73b5834fea68c | That depends on where Python came from.
If someone installed it deliberately, you can remove it without hurting
anything. On Windows, use the Add/Remove Programs icon in the Control Panel. | trusted_official_docs | CPython Docs | That depends on where Python came from.
If someone installed it deliberately, you can remove it without hurting
anything. On Windows, use the Add/Remove Programs icon in the Control Panel. | That depends on where Python came from.
If someone installed it deliberately, you can remove it without hurting
anything. On Windows, use the Add/Remove Programs icon in the Control Panel. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8a43586-dd07-4968-925e-ef122f538ea1 | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,514 | supabase-export-v2 | 0466b7574e497c8c | programming language because Python is easy to learn, but it's also used by professional software developers at places such as Google, NASA, and Lucasfilm Ltd.
If you wish to learn more about Python, start with the `Beginner's Guide to
Python <https://wiki.python.org/moin/BeginnersGuide>`_. | trusted_official_docs | CPython Docs | programming language because Python is easy to learn, but it's also used by professional software developers at places such as Google, NASA, and Lucasfilm Ltd.
If you wish to learn more about Python, start with the `Beginner's Guide to
Python <https://wiki.python.org/moin/BeginnersGuide>`_. | programming language because Python is easy to learn, but it's also used by professional software developers at places such as Google, NASA, and Lucasfilm Ltd.
If you wish to learn more about Python, start with the `Beginner's Guide to
Python <https://wiki.python.org/moin/BeginnersGuide>`_. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ed6170b7-aba2-40f3-8d3c-cdf34c9f7337 | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,513 | supabase-export-v2 | c4044bd70d29997a | What is Python? ---------------
Python is a programming language. It's used for many different applications. It's used in some high schools and colleges as an introductory programming
language because Python is easy to learn, but it's also used by professional
software developers at places such as Google, NASA, and Luc... | trusted_official_docs | CPython Docs | What is Python? ---------------
Python is a programming language. It's used for many different applications. It's used in some high schools and colleges as an introductory programming
language because Python is easy to learn, but it's also used by professional
software developers at places such as Google, NASA, and Luc... | What is Python? ---------------
Python is a programming language. It's used for many different applications. It's used in some high schools and colleges as an introductory programming
language because Python is easy to learn, but it's also used by professional
software developers at places such as Google, NASA, and Luc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
edb9a138-2ba9-4b1e-a978-eb0c96ccc339 | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,516 | supabase-export-v2 | 39404c898b2d619c | Why is Python installed on my machine? --------------------------------------
If you find Python installed on your system but don't remember installing it,
there are several possible ways it could have gotten there. | trusted_official_docs | CPython Docs | Why is Python installed on my machine? --------------------------------------
If you find Python installed on your system but don't remember installing it,
there are several possible ways it could have gotten there. | Why is Python installed on my machine? --------------------------------------
If you find Python installed on your system but don't remember installing it,
there are several possible ways it could have gotten there. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fadb5d3b-a15d-4652-a247-81b1b13a6d4a | CPython Docs | file://datasets/cpython/Doc/faq/installed.rst | unknown | 4a8ccf93-49b6-41c3-9529-9dc3887a0ab0 | 2,522 | supabase-export-v2 | 466c039aa09af6cf | third-party application, you can also remove it, but that application will no longer work. You should use that application's uninstaller rather than removing Python directly.
If Python came with your operating system, removing it is not recommended. If
you remove it, whatever tools were written in Python will no longer... | trusted_official_docs | CPython Docs | third-party application, you can also remove it, but that application will no longer work. You should use that application's uninstaller rather than removing Python directly.
If Python came with your operating system, removing it is not recommended. If
you remove it, whatever tools were written in Python will no longer... | third-party application, you can also remove it, but that application will no longer work. You should use that application's uninstaller rather than removing Python directly.
If Python came with your operating system, removing it is not recommended. If
you remove it, whatever tools were written in Python will no longer... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
197587a2-52f9-49ec-a7b7-b9a203a35849 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,580 | supabase-export-v2 | 1bc4b325aef8475a | use SWIG's ``%typemap`` command to make the change automatically, though I have not been able to get this to work (I'm a complete SWIG newbie).
6. Using a Python shell script to put up a Python interpreter window from inside
your Windows app is not a good idea; the resulting window will be independent
of your app's w... | trusted_official_docs | CPython Docs | use SWIG's ``%typemap`` command to make the change automatically, though I have not been able to get this to work (I'm a complete SWIG newbie).
6. Using a Python shell script to put up a Python interpreter window from inside
your Windows app is not a good idea; the resulting window will be independent
of your app's w... | use SWIG's ``%typemap`` command to make the change automatically, though I have not been able to get this to work (I'm a complete SWIG newbie).
6. Using a Python shell script to put up a Python interpreter window from inside
your Windows app is not a good idea; the resulting window will be independent
of your app's w... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d0022ac-cdc8-4311-b111-71c23c291936 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,528 | supabase-export-v2 | 1ef86057e38828d1 | How do I run a Python program under Windows? --------------------------------------------
This is not necessarily a straightforward question. If you are already familiar
with running programs from the Windows command line then everything will seem
obvious; otherwise, you might need a little more guidance. | trusted_official_docs | CPython Docs | How do I run a Python program under Windows? --------------------------------------------
This is not necessarily a straightforward question. If you are already familiar
with running programs from the Windows command line then everything will seem
obvious; otherwise, you might need a little more guidance. | How do I run a Python program under Windows? --------------------------------------------
This is not necessarily a straightforward question. If you are already familiar
with running programs from the Windows command line then everything will seem
obvious; otherwise, you might need a little more guidance. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2aa95129-e562-49db-ba64-40178ff61800 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,573 | supabase-export-v2 | 83318cdda24a9e36 | are two problems with Python's C API which will become apparent if you use a compiler other than MSVC, the compiler used to build pythonNN.dll.
Problem 1: The so-called "Very High Level" functions that take ``FILE *``
arguments will not work in a multi-compiler environment because each
compiler's notion of a ``struct... | trusted_official_docs | CPython Docs | are two problems with Python's C API which will become apparent if you use a compiler other than MSVC, the compiler used to build pythonNN.dll.
Problem 1: The so-called "Very High Level" functions that take ``FILE *``
arguments will not work in a multi-compiler environment because each
compiler's notion of a ``struct... | are two problems with Python's C API which will become apparent if you use a compiler other than MSVC, the compiler used to build pythonNN.dll.
Problem 1: The so-called "Very High Level" functions that take ``FILE *``
arguments will not work in a multi-compiler environment because each
compiler's notion of a ``struct... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2b4886a9-de3d-4f7f-bd8b-a1d6ec8ece45 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,563 | supabase-export-v2 | 674745e853d26b2b | undocumented fact.) Instead, link to :file:`python{NN}.dll`; it is typically installed in ``C:\Windows\System``. *NN* is the Python version, a number such as "33" for Python 3.3.
You can link to Python in two different ways. Load-time linking means
linking against :file:`python{NN}.lib`, while run-time linking means l... | trusted_official_docs | CPython Docs | undocumented fact.) Instead, link to :file:`python{NN}.dll`; it is typically installed in ``C:\Windows\System``. *NN* is the Python version, a number such as "33" for Python 3.3.
You can link to Python in two different ways. Load-time linking means
linking against :file:`python{NN}.lib`, while run-time linking means l... | undocumented fact.) Instead, link to :file:`python{NN}.dll`; it is typically installed in ``C:\Windows\System``. *NN* is the Python version, a number such as "33" for Python 3.3.
You can link to Python in two different ways. Load-time linking means
linking against :file:`python{NN}.lib`, while run-time linking means l... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
310fb702-8877-4c8d-b6c7-d6ac3e14dc9f | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,546 | supabase-export-v2 | 53acad5a88d66d75 | :func:`exit` function or enter the :kbd:`Ctrl-Z` character; Windows is running a single "python" command in the window, and closes it when you terminate the interpreter.
Now that we know the ``py`` command is recognized, you can give your
Python script to it. You'll have to give either an absolute or a
relative path to... | trusted_official_docs | CPython Docs | :func:`exit` function or enter the :kbd:`Ctrl-Z` character; Windows is running a single "python" command in the window, and closes it when you terminate the interpreter.
Now that we know the ``py`` command is recognized, you can give your
Python script to it. You'll have to give either an absolute or a
relative path to... | :func:`exit` function or enter the :kbd:`Ctrl-Z` character; Windows is running a single "python" command in the window, and closes it when you terminate the interpreter.
Now that we know the ``py`` command is recognized, you can give your
Python script to it. You'll have to give either an absolute or a
relative path to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a0beef9-2ddd-4d0f-bda1-5d1f0eb446d8 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,587 | supabase-export-v2 | 56079965d03aa262 | Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is present, and ``getch()`` which gets one character without echoing it.
How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error? ------------------------------------------------------------------- | trusted_official_docs | CPython Docs | Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is present, and ``getch()`` which gets one character without echoing it.
How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error? ------------------------------------------------------------------- | Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is present, and ``getch()`` which gets one character without echoing it.
How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error? ------------------------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
41a9e15b-3af5-4c7e-a7df-350e02e3106e | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,560 | supabase-export-v2 | b99a59a78c3b17d9 | foo``. In a DLL, linkage is declared in the source code with ``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of available functions.
How can I embed Python into a Windows application? -------------------------------------------------- | trusted_official_docs | CPython Docs | foo``. In a DLL, linkage is declared in the source code with ``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of available functions.
How can I embed Python into a Windows application? -------------------------------------------------- | foo``. In a DLL, linkage is declared in the source code with ``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of available functions.
How can I embed Python into a Windows application? -------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
43f0443f-69b0-4811-9a32-ab4e00fed39c | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,555 | supabase-export-v2 | 9c10a015dba3f04b | on your systems to ensure that they are indeed configured identically. McAfee, when configured to scan all file system read activity, is a particular offender.
How do I make an executable from a Python script? ------------------------------------------------- | trusted_official_docs | CPython Docs | on your systems to ensure that they are indeed configured identically. McAfee, when configured to scan all file system read activity, is a particular offender.
How do I make an executable from a Python script? ------------------------------------------------- | on your systems to ensure that they are indeed configured identically. McAfee, when configured to scan all file system read activity, is a particular offender.
How do I make an executable from a Python script? ------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
538bff71-ff27-460f-9da7-72588218bed2 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,569 | supabase-export-v2 | 9e9fd68f7a40280f | into your .exe file is that calling the initialization function is equivalent to importing the module into Python! (This is the second key undocumented fact.)
4. In short, you can use the following code to initialize the Python interpreter
with your extension module. | trusted_official_docs | CPython Docs | into your .exe file is that calling the initialization function is equivalent to importing the module into Python! (This is the second key undocumented fact.)
4. In short, you can use the following code to initialize the Python interpreter
with your extension module. | into your .exe file is that calling the initialization function is equivalent to importing the module into Python! (This is the second key undocumented fact.)
4. In short, you can use the following code to initialize the Python interpreter
with your extension module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
58a68beb-272f-44d2-a89e-f3e5ab2c83bd | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,572 | supabase-export-v2 | 6b9f014a781f439a | #include <Python.h> ... Py_Initialize(); // Initialize Python. initmyAppc(); // Initialize (import) the helper class. PyRun_SimpleString("import myApp"); // Import the shadow class.
5. There are two problems with Python's C API which will become apparent if you
use a compiler other than MSVC, the compiler used to buil... | trusted_official_docs | CPython Docs | #include <Python.h> ... Py_Initialize(); // Initialize Python. initmyAppc(); // Initialize (import) the helper class. PyRun_SimpleString("import myApp"); // Import the shadow class.
5. There are two problems with Python's C API which will become apparent if you
use a compiler other than MSVC, the compiler used to buil... | #include <Python.h> ... Py_Initialize(); // Initialize Python. initmyAppc(); // Initialize (import) the helper class. PyRun_SimpleString("import myApp"); // Import the shadow class.
5. There are two problems with Python's C API which will become apparent if you
use a compiler other than MSVC, the compiler used to buil... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7912cae1-3108-46eb-b9d8-0d553276189b | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,536 | supabase-export-v2 | 65b305dc89b93b46 | compiles it into bytecodes, and then executes the bytecodes to run your program. So, how do you arrange for the interpreter to handle your Python?
First, you need to make sure that your command window recognises the word
"py" as an instruction to start the interpreter. If you have opened a
command window, you should tr... | trusted_official_docs | CPython Docs | compiles it into bytecodes, and then executes the bytecodes to run your program. So, how do you arrange for the interpreter to handle your Python?
First, you need to make sure that your command window recognises the word
"py" as an instruction to start the interpreter. If you have opened a
command window, you should tr... | compiles it into bytecodes, and then executes the bytecodes to run your program. So, how do you arrange for the interpreter to handle your Python?
First, you need to make sure that your command window recognises the word
"py" as an instruction to start the interpreter. If you have opened a
command window, you should tr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a2be03f-0912-4cbf-b69b-f6edf8899c0f | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,564 | supabase-export-v2 | 4988c92b901840eb | while run-time linking means linking against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is the so-called "import lib" corresponding to :file:`python{NN}.dll`. It merely defines symbols for the linker.)
Run-time linking greatly simplifies link options; everything happens at run
time. Your code must l... | trusted_official_docs | CPython Docs | while run-time linking means linking against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is the so-called "import lib" corresponding to :file:`python{NN}.dll`. It merely defines symbols for the linker.)
Run-time linking greatly simplifies link options; everything happens at run
time. Your code must l... | while run-time linking means linking against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is the so-called "import lib" corresponding to :file:`python{NN}.dll`. It merely defines symbols for the linker.)
Run-time linking greatly simplifies link options; everything happens at run
time. Your code must l... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7add4249-acc0-4034-aaea-e1c7b096dc8e | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,581 | supabase-export-v2 | 982e65fee351308c | object that supports read and write, so all you need is a Python object (defined in your extension module) that contains read() and write() methods.
How do I keep editors from inserting tabs into my Python source? ---------------------------------------------------------------- | trusted_official_docs | CPython Docs | object that supports read and write, so all you need is a Python object (defined in your extension module) that contains read() and write() methods.
How do I keep editors from inserting tabs into my Python source? ---------------------------------------------------------------- | object that supports read and write, so all you need is a Python object (defined in your extension module) that contains read() and write() methods.
How do I keep editors from inserting tabs into my Python source? ---------------------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b09deda-e891-442f-ae38-803dd10398d2 | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,545 | supabase-export-v2 | 9c2063c7fafc6c49 | function or hold the :kbd:`Ctrl` key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your Windows command prompt.
You may also find that you have a Start-menu entry such as :menuselection:`Start
--> Programs --> Python 3.x --> Python (command line)` that results in you
seeing the ``>>>``... | trusted_official_docs | CPython Docs | function or hold the :kbd:`Ctrl` key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your Windows command prompt.
You may also find that you have a Start-menu entry such as :menuselection:`Start
--> Programs --> Python 3.x --> Python (command line)` that results in you
seeing the ``>>>``... | function or hold the :kbd:`Ctrl` key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your Windows command prompt.
You may also find that you have a Start-menu entry such as :menuselection:`Start
--> Programs --> Python 3.x --> Python (command line)` that results in you
seeing the ``>>>``... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b17666e-d138-411b-8c1d-dd75d00bde6c | CPython Docs | file://datasets/cpython/Doc/faq/windows.rst | unknown | ec50aa45-717e-41da-86af-fed276d7422d | 2,586 | supabase-export-v2 | e0b20ea5430e099b | How do I check for a keypress without blocking? -----------------------------------------------
Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is
present, and ``getch()`` which gets one character without echoing i... | trusted_official_docs | CPython Docs | How do I check for a keypress without blocking? -----------------------------------------------
Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is
present, and ``getch()`` which gets one character without echoing i... | How do I check for a keypress without blocking? -----------------------------------------------
Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module. It defines a function ``kbhit()`` which checks whether a keyboard hit is
present, and ``getch()`` which gets one character without echoing i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.