Python Learning Series Python Adorner Basics (5)---multi-adorner use

Source: Internet
Author: User

In some cases, it may be necessary to work with multiple adorners at the same time, in particular how to use, see Code:

#basic5. Pydef auth1 (func): Def inner (): print ' before 1 ' func () print ' after 1 ' return innerdef Auth2 (func): Def inner (): print ' before 2 ' func () print ' After 2 ' return inner@auth2@auth1def F1 (): print ' F1 '

Executive section:

#b5. Py#coding:utf-8import basic5basic5.f1 ()

Execution Result:

#python b5.pybefore 2before 1f1after 1after 2


This article is from the "bitter coffee ' s Yun ' an Road" blog, please be sure to keep this source http://alsww.blog.51cto.com/2001924/1718270

Python Learning Series Python Adorner Basics (5)---multi-adorner use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.