Nov-18-2017, 12:25 PM
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" .
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 ?
Thank you.
Best regards,
Vladislav
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" .
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 ?
Thank you.
Best regards,
Vladislav