Re: [Python-ideas] Python Decorator Improvement Idea

2018-06-16 Thread Eric V. Smith
On 6/16/2018 8:22 PM, Michael Selik wrote: The idea of having a dunder to introspect the bound variable name has been discussed before. You can find the past discussions in the mailing list archive. If I recall correctly, there were very few use cases beyond namedtuple. With dataclasses availab

Re: [Python-ideas] Python Decorator Improvement Idea

2018-06-16 Thread Michael Selik
The idea of having a dunder to introspect the bound variable name has been discussed before. You can find the past discussions in the mailing list archive. If I recall correctly, there were very few use cases beyond namedtuple. With dataclasses available in 3.7, there may be even less interest than

Re: [Python-ideas] Python Decorator Improvement Idea

2018-06-16 Thread Brian Allen Vanderburg II via Python-ideas
On 06/16/2018 01:22 AM, Steven D'Aprano wrote: > Some of the information would be available in all >> contexts, while other information may only be available in certain >> contexts.The parameter's value cannot be explicitly specified, defaults >> to Null except when called as a decorator, and can

Re: [Python-ideas] Python Decorator Improvement Idea

2018-06-15 Thread Steven D'Aprano
On Fri, Jun 15, 2018 at 11:54:42PM -0400, Brian Allen Vanderburg II via Python-ideas wrote: > An idea I had is that it could be possible for a decorator function to > declare a parameter which, when the function is called as a decorator, > the runtime can fill in various information in the parame

[Python-ideas] Python Decorator Improvement Idea

2018-06-15 Thread Brian Allen Vanderburg II via Python-ideas
Just a small idea that could possibly be useful for python decorators. An idea I had is that it could be possible for a decorator function to declare a parameter which, when the function is called as a decorator, the runtime can fill in various information in the parameters for the decorator to us