On Thu, Mar 17, 2016 at 8:23 PM, Antoon Pardon <antoon.par...@rece.vub.ac.be> wrote: > Op 17-03-16 om 03:02 schreef Chris Angelico: >> On Thu, Mar 17, 2016 at 12:54 PM, Steven D'Aprano <st...@pearwood.info> >> wrote: >> >>> I wouldn't want to rely on it working with decorator syntax either. Even if >>> it does now, I'm not sure that's a language guarantee. >> That's the thing, though. It's not a guarantee, yet it does work in >> every Python interpreter that I tried it in. > > That depends on what you mean by work. This failes: > [doing the same thing in a function]
Very true; I could have messed around with getframe, but most classes are global, and it keeps things simple. ChrisA -- https://mail.python.org/mailman/listinfo/python-list