News for hackers. Stuff that matters.
Re:Progress on No-GIL CPython by lacker on Friday October 20, 2023 @06:17PM (#37962116)
Perhaps it could just fail at runtime if you ever import a module that doesn't support nogil mode? AFAICT that's how it works if, for example, you run Python code that uses f-strings in a Python version that doesn't support f-strings.
Re:Progress on No-GIL CPython by tyingq on Friday October 20, 2023 @07:15PM (#37962537)
Python's support for run-time version/flag/setting detection isn't great for this kind of thing either. With Perl, for example, you get a BEGIN {} block that is run before it tries to parse the script...so you can detect and shim, etc.

Python bombs before you can gain any control, because it parses the whole file. So you can separate things into modules to get around that, but it's not great when you want a simple one-file script.

Re:Progress on No-GIL CPython by siddheshgunjal on Friday October 20, 2023 @09:39PM (#37963336)
We experienced programmers who know how to separate things into modules and use it wisely at the correct place. But most of the beginners and intermediate developers always tend to do it in a "Everything in single script" manner which might also make it difficult to have more control over the application's behaviour.
Re:Progress on No-GIL CPython by tyingq on Friday October 20, 2023 @09:52PM (#37963398)
You're making a lot of assumptions in a smug sort of way. There's plenty of spots where a single script makes sense, and plenty where it doesn't.