Why Doesn’t Python Have Switch/Case?

Tuesday, June 09, 2015
(permalink)

Similar

Object Spread Operator for Python

Say you have a dictionary that you want to both copy and update. In JavaScript, this is a common pattern that gets its own syntax, called the object spread operator: const oldObject = { hello: 'world', foo: 'bar' } const newObject = { ...oldObject, foo: '... (more…)

Read more »

Python -m

python -m lets you run modules as scripts. If your module is just one .py file it'll be executed (which usually means code under if __name_...

Read more »