Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importable vomits entire file on closure built with inner lambda #36

Closed
mmckerns opened this issue May 9, 2014 · 1 comment
Closed
Labels

Comments

@mmckerns
Copy link
Member

mmckerns commented May 9, 2014

There's a bug (I'm sure more than one) so that when you make a closure with a lambda as the inner function (as in foo below), dill.source.importable(bar) will puke out the entire history file. So that's not good. The following code reproduces the error.

>>> def foo(f):
...   squared = lambda x: f(x)**2
...   return squared
... 
>>> @foo
... def bar(x):
...   return 2*x
>>> 
>>> print dill.source.importable(bar)
@mmckerns mmckerns added the bug label May 9, 2014
@mmckerns
Copy link
Member Author

fixed, I think, in e78cd06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant