Exploring Python's awesomeness. By Ariel Ortiz.

Category: Programming techniques

More On Function Decorators

In my previous post , I presented a couple of examples on how to use function decorators in Python. Those examples were illustrative, yet fairly restricted. First of all, they assumed that the function being decorated only receives one positional argument. What can I do if I want to decorate...

Function Decorators

The Python programming language has an interesting syntactic feature called a decorator . Let's use an example in order to explain how and why you would want to use a Python decorator. NOTE: All Python code examples presented here are based in Python 3.0. Full source code:...
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LT - Design by BalearWeb