Python Wrapper

  • A wrapper is a python module that interface between python and another software library function which is a non python interface.
  • Python wrapper allows users to write only python code, even when calling non python libraries.Decorators are also called ‘wrappers’.
  • To pass the argument from my_function to wrapper the syntax is,
def wrapper(x):

If you need more functions we do have something like:

def wrapper(*args, **kwargs):

But, your logic within the decorator should able to handle the args and kwargs generally.

Categorized in:

Python

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock