Re: Passing parameters thru decorators

2017-04-12 Thread Peter Otten
andrew.hol...@otternetworks.de wrote: > Hi, > > I'm trying to work out how to pass parameters through decorators: > > class Meow(): > > def __init__(self, arg1, arg2): > print("INIT ClassBasedDecoratorWithParams") > print(arg1) > print(arg2) > > def makebold(sel

Re: Passing parameters thru decorators

2017-04-12 Thread MRAB
On 2017-04-12 21:42, andrew.hol...@otternetworks.de wrote: Hi, I'm trying to work out how to pass parameters through decorators: class Meow(): def __init__(self, arg1, arg2): print("INIT ClassBasedDecoratorWithParams") print(arg1) print(arg2) def makebold(

Passing parameters thru decorators

2017-04-12 Thread andrew . holway
Hi, I'm trying to work out how to pass parameters through decorators: class Meow(): def __init__(self, arg1, arg2): print("INIT ClassBasedDecoratorWithParams") print(arg1) print(arg2) def makebold(self, fn): def wrapped(): return "" +