Conversation
|
Thanks @andrewcleveland , this is definitely helpful ! I wrote a few comments, mostly details - the principle is good. |
|
Hi @smarie, Per your note about |
|
Thanks a lot @andrewcleveland ! I have two minor comments, mostly to improve readability/ future maintenance, see above |
|
Hi @andrewcleveland , would you mind updating your PR according to the two comments above, so that we can merge ? Users of What is missing is just code comments in two sections. |
…bda functions to docstring
… no longer needed because we are using co_name
|
Hi @smarie, sorry for the delay. I did some work on this about a month ago and then kind of put it on the back burner. |
|
Thanks @andrewcleveland ! I had a few other comments, hopefully easy to cope with |
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
|
Hi @smarie, I made the changes you suggested. Moving the conditional I moved the import to the bottom of main.py, but I'm not sure if that's the best way to resolve it. |
|
Thanks @andrewcleveland !
that way, the if/else can be moved to the top just after the imports, and there is no circular dependency anymore. Thanks! |
…_legacy_py.py` to `main.py`
|
@smarie, option 1 is done. |
|
All set, thanks a lot @andrewcleveland for your patience ! |
Adds to
create_functiona check iffunc_nameis'<lambda>', and if so builds a lambda expression instead of a regular function definition. This is passed in by@wraps(f)whenfis a lambda function.Without this,
create_functionbuilds a function definition'def <lambda>(...):'which fails to compile.Also adds a test to verify the above is working.
Resolves #81.
(lambda: None).__name__is used in place of'<lambda>'in case a different Python implementation uses a different name.Coverage.py complains about the
lambda: Nonenot being run. I don't know if that's an issue or not.