Add Virtual Threads to Python - Ideas - Discussions on Python.org
May 9, 2025 ... tl;dr Java has virtual threads. Virtual threads are a better way of doing concurrency than Python's async and await. We should add virtual ...
May 9, 2025 ... tl;dr Java has virtual threads. Virtual threads are a better way of doing concurrency than Python's async and await. We should add virtual ...
Discussions related to the Python Programming Language, Python Community, and Python Software Foundation operations.
Dec 1, 2019 · I would like str.replace, when given a set of characters, to replace occurrence of any of the characters in the set. I.e. 'ASDFGH'.replace(set('SFH'), '') == 'ADG' should then hold. It would mean I would not have to go to the trouble of using the re module for a common string operation. By extension, a set of multi-character strings should have any occurrences of the strings replaced, (in an ...
Jan 5, 2026 ... ... complexity trade off); I teach Python and this seems like a syntax ... } replacement field includes a string that contains a newline. I ...
It seems to be writing the hex characters into the string which is mainly responsible for the speed difference.No but it does prove that in this case the extra complexity of using RegEx over replace is not worth it.
Jul 11, 2026 · Replacing one string inside another but without interfering with a second replace Python Help help NickC
Apr 9, 2023 ... ... replace(" ", "_") movies[key] = movie(title, director, year) ... complexity, which I feel (rightly or wrongly) would be the case for the ...
I am concerned about LLM code in PythonIs this a secure way to generate deterministic secrets in...
Oct 23, 2024 · a) gh-119702: New dynamic algorithm selection for string search (+ `rfind` alignment) by dg-pb · Pull Request #120025 · python/cpython · GitHub b) Add tuple support to more str functions - #136 by dg-pb c) String API changes After these, implementing multi-pattern replace, split and similar will be straight forward.
Mar 27, 2024 ... Problem Statement Given an unindented string as input, perform these steps: Identify the list items at the highest level of the hierarchy ...
Is there a way to break a long expression that is inside the replacement field of an f-string? For example, print(f'{x + y + z}') something like print( f'{ x + y + z }' ) I understand t…
Oct 21, 2024 · Summary: I would like to propose an extension to the .replace() method to allow multiple substring replacements in a string using a dictionary. Currently, .replace() accepts only two arguments (the value to be replaced and the replacement value), which results in the need for multiple calls to replace different characters or words. With this new functionality, it would be possible to perform ...
Apr 2, 2019 ... For example, Java runs all finalizers in a separate thread, to reduce weird reentrancy issues. ... string means RuntimeError” as a special ...
Jan 20, 2024 · When manipulating data in files, there are two problems: converting file data to python objects; manupulating the python objects; and possibly converting python object to file data. I strongly recommend starting with the middle problem, with example data in in-code strings. ... This prints what you requested starting with the example data.
Sep 16, 2025 ... _day + elif day < 0: + day = _days_in_month(year, month) + 1 + day return type(self)(year, month, day) __replace__ = replace @@ -2090,6 +2092,8 ...
Jul 20, 2022 · Split to two expressions for better readability. Note to the original code: You want to create a different number of strings. This cannot be done by using str.replace () because this function changes a string to a different string. This function cannot split or join strings which would be needed to change their number.
Sep 7, 2023 ... Having a build farm that does all of {C, C++, Fortran, Rust, CUDA, Java, JavaScript, …} ... replace many recipes with a delegation to pip ...