Python Forum
Where is "switch" statement ? Do nobody needs it ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is "switch" statement ? Do nobody needs it ?
#1
Hello.

I wonder that in Python there's absent "switch" statement.
And the most interesting - nobody asks about it, nobody discusses it.
Seems, it's very often used in Javascript/Coffeescript, who have such statement.
But in Python it's absent.
There were added some less often-used features in Python, like decorators, "with" statements, "as" operator.
But no "switch" Cry .

Please, tell me what do you think about this.
Maybe I don't know something and writing each time "if somevar == 'SOMEVALUE'" is a better practice ? Smile

Thank you.
Best regards,
Vladislav
Reply


Messages In This Thread
Where is "switch" statement ? Do nobody needs it ? - by vlad1777d - Nov-18-2017, 12:25 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020