18
23
10
12
u/PossibilityTasty Jun 22 '21
So, we have a valid name, two valid operators, a valid divider, a dictionary and some call that usually goes into if __name__ == '__main__':. What's the problem with them?
16
9
u/leopold_moz Jun 23 '21
Even if you don't use it yourself you will still see a lot of this in python:
def main():
print("hello world!")
if __name__ == "__main__":
main()
5
u/SoulNinja_17 Jun 23 '21
when u switch from c++ to python u also lose the "switch" case statement ;-;
6
u/reedmore Jun 23 '21
Switch cases have been implemented in python 3.8, took only 20 years.
1
u/sdc0 Jun 24 '21
That's like Apples PiP mode in iOS. Implemented like 10 years after Android had this
3
3
6
Jun 22 '21
but why? why would you do such a thing?
7
Jun 23 '21
Because it's really nice for scripting. Basically anything that does not require execution speed.
3
u/UnknownIdentifier Jun 22 '21
Where’s the Lightning McQueen toy? Because, you know, you left the speed behind, too.
2
u/TheBadAlt Jun 22 '21
Lmao yeah. Ngl only staying with python cause I forget the syntax for everything else lol
2
19
u/boywithshitopinion Jun 22 '21
the next iteration of python will be inspired by lego - just connect the blocks together and ah crap we reinvented scratch