News for hackers. Stuff that matters.
Re:GIL Become Optional in Python 3.13 by KaiserPro on Monday August 12, 2024 @06:04AM (#41222860)
Its not runtime enforceable though. Personally whilst I do provide type hints (I have a the linter setup to remind me) They are only really useful as a documentation tool.

As they are not enforced at runtime, you can easily return bollocks and not know.

I really like how c# does it, which is have strict typing on by default, but allowing you to turn it off for things where you're wanting to be loosey goosey. Not having to do a bunch of type checks on every operation would also speed up a bunch of things inside python

However, that would make it a different language. perhaps python 4? (ducks)

Re:GIL Become Optional in Python 3.13 by skeledrew on Monday August 12, 2024 @11:10PM (#41231825)
See typeguard[0] for runtime type checking. I activate it only during testing, avoiding unnecessary overhead in prod.

[0] https://pypi.org/project/typeguard/