#!/usr/bin/env python # *-# -*- coding: utf-8 -*- def cake(): return "cake" print cake() #-> cake def chocolate(func): return lambda:"chocolate " + func() def special(func): return lambda:"special " + func() @chocolate def cake(): return "cake" print cake() #-> chocolate cake @special @chocolate def doughnut(): return "doughnut" print doughnut() #-> special chocolate doughnut
いまいち使いどころがわかんないデコ。