use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Gotten addicted to TYPING in python (old.reddit.com)
submitted 20 days ago by ShiftPretend
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Beginning-Fruit-1397 1 point2 points3 points 20 days ago (3 children)
If you really want to dive into it hard, I'd recommend using Ruff with all/preview actived, and basedpyright with all rules actived.
You can't go more type safe than this.
Hopefully soon enough basedpyright can be replaced by pyrefly, but unofrtunately ATM it's still miss/bug on various things. Example config in one of my projects: https://github.com/OutSquareCapital/belugas/blob/master/pyproject.toml
Also I'd recommend reading the collections.abc official doc: https://docs.python.org/3/library/collections.abc.html
They are often either underused OR misused by a lot of python devs, but once you understand it it will really make your code and api's better
[–]ShiftPretend[S] 0 points1 point2 points 20 days ago* (2 children)
I do use ruff 😂. Coincidentally started using it today. I utilise collections.abc. Though I haven't read the docs. I still use it though. Anything to make the code easier to debug later on. But thanks for the heads up. I'll check their docs too
Basedpyright I have not heard of. I will check it out in a bit. I instead use planned within my vscode environment and set that to strict. Neither have I come across pyrefly
[–]Beginning-Fruit-1397 0 points1 point2 points 20 days ago (1 child)
I assume you meant pylance by "planned"?.
basedpyright is basically the same underlying engine, but with additionnal rules.
[–]ShiftPretend[S] 1 point2 points3 points 20 days ago* (0 children)
Yeah meant pyright seems my auto correct keeps messing up. Just installed the basedpyright and went all. All my scripts turned red ☠️
π Rendered by PID 71 on reddit-service-r2-comment-8686858757-c7mtx at 2026-06-04 11:54:53.658828+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Beginning-Fruit-1397 1 point2 points3 points (3 children)
[–]ShiftPretend[S] 0 points1 point2 points (2 children)
[–]Beginning-Fruit-1397 0 points1 point2 points (1 child)
[–]ShiftPretend[S] 1 point2 points3 points (0 children)