AniketJun 24, 20183 minPythonPython: Powerful Closures and DecoratorsPython is a beautiful language. One of the multiple reasons, what makes it powerful is the fact that functions in python are first class...
AniketJun 10, 20181 minPythonPython: Dictionary Lookup With a Default ValueHow do you lookup keys in the python dictionary? You will typically find or write a code like this (ignore initialization part of...
AniketJun 10, 20182 minPythonMultipurpose 'with' statement in PythonIs it possible to create a scoped lock, or as well known in the C++ world - Resource-Acquisition-is-Initialization (RAII) classes in...
AniketJun 10, 20182 minPythonPython: Return Dictionary as ReadOnly from ClassPersonally I have had many situations where I had to return a dictionary from a class to the caller and I did not initially think on...
AniketJun 9, 20184 minPythonCorrect way to iterate an iteratable in PythonWriting effective loops in python is a skill, it is that plain and simple. If you aren’t doing that then no worries, it is really easy...