Yearly Archives

Decorators in Python

Decorators are very powerful and useful tool in Python since it allows programmers to modify the behavior of function...

Decorators in Python

Decorators are very powerful and useful tool in Python since it allows programmers to modify the behavior of function...

Function Decorators in Python | Set 1 (Introduction)

Background Following are important facts about functions in Python that are useful to understand decorator functions. In Python, we...

Function Decorators in Python | Set 1 (Introduction)

Background Following are important facts about functions in Python that are useful to understand decorator functions. In Python, we...

Python Closures

Before seeing what a closure is, we have to first understand what nested functions and non-local variables are. Nested...

Python Closures

Before seeing what a closure is, we have to first understand what nested functions and non-local variables are. Nested...

*args and **kwargs in Python

In Python, we can pass a variable number of arguments to a function using special symbols. There are two...

*args and **kwargs in Python

In Python, we can pass a variable number of arguments to a function using special symbols. There are two...

Precision Handling in Python

Python in its definition allows to handle precision of floating point numbers in several ways using different functions. Most...

Precision Handling in Python

Python in its definition allows to handle precision of floating point numbers in several ways using different functions. Most...

First Class functions in Python

First class objects in a language are handled uniformly throughout. They may be stored in data structures, passed as...

First Class functions in Python

First class objects in a language are handled uniformly throughout. They may be stored in data structures, passed as...

Partial Functions in Python

Partial functions allow us to fix a certain number of arguments of a function and generate a new function....

Partial Functions in Python

Partial functions allow us to fix a certain number of arguments of a function and generate a new function....

Returning Multiple Values in Python

In Python, we can return multiple values from a function. Following are different ways 1) Using Object: This is...

Returning Multiple Values in Python

In Python, we can return multiple values from a function. Following are different ways 1) Using Object: This is...

When to use yield instead of return in Python?

The yield statement suspends function’s execution and sends a value back to the caller, but retains enough state to...

When to use yield instead of return in Python?

The yield statement suspends function’s execution and sends a value back to the caller, but retains enough state to...