One idiomatic practice in Python that often surprises people coming from programming languages where exceptions are considered, well, exceptional, is EAFP: “it’s easier to ask for forgiveness than permission”. Quickly, EAFP means that you should just do what you expect to work and if an exception might be thrown from the operation then catch it and deal with that fact.
This post is contributed by Refaat Issa from the Nano Server team, and was originally posted on their blog. Nano Server has also blogged about their support for MySQL and Node.js.
One of Nano Server’s core scenarios is to serve as a lightweight OS for born-in-the-cloud applications running in a VM or a container.
Carl Kadie, Ph.D., is a research developer in Microsoft Research/TnR working on Genomics.
Lambda expressions provide a way to pass functionality into a function. Sadly, Python puts two annoying restrictions on lambda expressions. First, lambdas can only contain an expression, not statements.