Reply to post:

While Windows 7 wobbled, AI continued its relentless march at Microsoft

Charlie Clark Silver badge

In the case of 'switch' it is if ... elif ... else ... . It does the job.

Actually, in cases where you might want to use a

SWITCH
in Python you can use OO and use dictionary dispatching where each condition is mapped to a function or method because
if…elif…else
is foolproof but can be a pain to maintain.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon