add support for _call_ = False in config_to_dict (so bare function or class)#3
add support for _call_ = False in config_to_dict (so bare function or class)#3thomasloux wants to merge 4 commits intomainfrom
Conversation
|
@acecchini I need this code for my auto generation of config for Matune. But it also actually solves a TODO that was in comments in your code |
|
Ok I'll take care of this ASAP |
|
I should add tests, but that's for later I think. Here is an example: from math import sqrt
import fiddledyn
class Test:
def __init__(self, fn):
self.fn = fn
import fiddle
a = fiddle.Config(Test, fn=sqrt)
print(a)
b = fiddledyn.config_to_dict(a)
print(b)
c = fiddledyn.dict_to_config(b)
print(c)
d = fiddle.build(c)
assert a.fn == d.fn # assert passesWhich give |
|
I have updated In particular Furthermore, when setting Finally, |
No description provided.