Tornado – Options

You must have observed, all this while we have written tornado based applications that listen on port 8888, and in MySQL post, we had predefined our database connection details (like server, username, password etc). But what if we need to change these details based on modules or applications or configurations? Tornado, provides this with a … Continue reading Tornado – Options

Python Decorators

Let's start with something simple..What is a decorator? According to, "A decorator is the name used for a software design pattern. Decorators dynamically alter the functionality of a function, method, or class without having to directly use subclasses or change the source code of the function being decorated" A classic example tat I can … Continue reading Python Decorators

Mystery with remove and pop in Python lists

Thanks Vishal for his inputs on this.. According to python docs list.remove(x)Remove the first item from the list whose value is x. It is an error if there is no such item.list.pop([i])Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last … Continue reading Mystery with remove and pop in Python lists