[Python-Dev] Re: Decorators: vertical bar syntax
Simon Percivall
s.percivall at chello.se
Mon Aug 9 23:34:50 CEST 2004
More information about the Python-Dev mailing list
Mon Aug 9 23:34:50 CEST 2004
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2004-08-09, at 21.20, Simon Percivall wrote: > On 2004-08-09, at 19.50, Fernando Perez wrote: >> I further worry what will happen to tools like inspect.getsource() >> with >> decorators outside the def: >> >> @foo >> @bar >> def baz(x,y): >> .... >> >> if I try to get the source for baz, will I see foo/bar? For >> introspection >> tools, this can lead to pretty misleading results. But perhaps this >> is easy >> to solve or has even already been taken care of. I imagine if >> @foo/@bar were >> inside the def, this wouldn't be an issue. > > Right now, you'll see the source of the function/method defined above > the decorators or, if none, the top line/lines of the source file. Yes, > it's pretty broken. I uploaded a quick patch for this broken behaviour to SF, patch 1006219, if anyone cares. //Simon
- Previous message: [Python-Dev] Re: Decorators: vertical bar syntax
- Next message: [Python-Dev] Re: Decorators: vertical bar syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list