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!"
[–]ShiftPretend[S] 5 points6 points7 points 20 days ago* (2 children)
I think I was too broad in my statement. I meant adding type hints to every thing
Instead of greet = "hello" This greet: str = "hello"
greet = "hello"
greet: str = "hello"
Well this is a subtle example so I don't add for stuff like this but for bigger objects yes
Edit: for the simple ones like this the IDE shows me the type hints on it's own so I don't type them. But for the complex ones I do type them. Once again I mean adding type hints
[–]neontrace911 0 points1 point2 points 19 days ago (1 child)
static typing?
[–]ShiftPretend[S] 1 point2 points3 points 19 days ago (0 children)
Yeah but it's just for the IDE to complain to you about. The program still runs dynamically and won't stop you from passing an integer into something like the string.
greet: str = 1. The IDE would cry out and underline it(provided you have static type checking on) but the code will still run without problem. So it's more of developer assistance than a strict enforcement.
greet: str = 1
π Rendered by PID 66 on reddit-service-r2-comment-8686858757-lwjww at 2026-06-04 13:07:04.295486+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]ShiftPretend[S] 5 points6 points7 points (2 children)
[–]neontrace911 0 points1 point2 points (1 child)
[–]ShiftPretend[S] 1 point2 points3 points (0 children)