@H2HOLE · Post #161 · 27.05.2024 г., 16:25
Python 3.13 起已可使用 --disable-gil 关闭 GIL。 https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython thread: /4469 #Python#GIL
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #172 · 26 окт.
Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта. Вполне может заменить самостоятельно придуманную регулярку. >>> 'some_name'.isidentifier() True Обычное имя переменной >>> '私は手紙です'.isidentifier() True Юникод в качестве имени тоже доступен >>> '1_name'.isidentifier() False Имя не может начинаться с цифры >>> '੬_name'.isidentifier() False Включая все цифры юникода >>> 'some name'.isidentifier() False Пробелы недопустимы #basic
Hashtags
Пребарај: #gil
@H2HOLE · Post #161 · 27.05.2024 г., 16:25
Python 3.13 起已可使用 --disable-gil 关闭 GIL。 https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython thread: /4469 #Python#GIL
@djangoproject · Post #156 · 06.09.2016 г., 01:43
https://wiki.python.org/moin/GlobalInterpreterLock In #CPython, the #global#interpreter lock, or #GIL, is a mutex that prevents multiple native #threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.)