v_args decorator calls FunctionType function with self.
See original GitHub issueWhen decorating a Transformer
with v_args, the decorated functions are called with self even for non-method.
The last parameter at this line should be False, isn’t it? https://github.com/lark-parser/lark/blob/master/lark/utils.py#L63
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
python - How to create a decorator that can be used either ...
An alternative method is just to require that the decorator function is always called, even if it is with no arguments. In this...
Read more >Function Decorators — wrapt 1.13.0rc2 documentation
Only the arguments following on from the self argument will be a part of args. When calling the wrapped function in the decorator...
Read more >Primer on Python Decorators
Decorators provide a simple syntax for calling higher-order functions. By definition, a decorator is a function that takes another function and extends the ......
Read more >LLVM Language Reference Manual
This calling convention supports varargs function calls and tolerates some mismatch ... with different parameter attributes can have the same function type.
Read more >Source code for param.parameterized - HoloViz
__self__ if sys.version_info.major >= 3 else method.im_self ... [docs]def as_uninitialized(fn): """ Decorator: call fn with the parameterized_instance's ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Btw, if you want to write a test encompassing all the possibilities (method, static, clsmethod, lambda, etc.) that would be great.
Great. Thanks again. I will git it a try.