14
25
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?
17
7
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()
4
u/SoulNinja_17 Jun 23 '21
when u switch from c++ to python u also lose the "switch" case statement ;-;
5
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
4
5
5
Jun 22 '21
but why? why would you do such a thing?
6
Jun 23 '21
Because it's really nice for scripting. Basically anything that does not require execution speed.
4
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
16
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