Giter Club home page Giter Club logo

Comments (4)

mmckerns avatar mmckerns commented on August 17, 2024

Hmm… that looks like it could be an oversight. I don't usually extend dill with the Pickler and Unpickler, so that code's not as strongly tested there. Tell you what… why don't make a pull request and I'll review it? It'd be especially nice if you show how it fixes a simple issue for you. If you don't want to do that, then I'll patch it and write the tests -- but I'd like you to have first crack at it, since it's your patch.

from dill.

citibeth avatar citibeth commented on August 17, 2024

The following is a test program that should work:

import dill
import StringIO

def my_fn(x):
    return x * 17

obj = lambda : my_fn(34)
print 'obj() returns %d' % obj()

obj_io = StringIO.StringIO()
pickler = dill.Pickler(obj_io)
pickler.dump(obj)

obj_str = obj_io.getvalue()
print 'obj() pickled to %d bytes' % len(obj_str)

obj2_io = StringIO.StringIO(obj_str)
unpickler = dill.Unpickler(obj2_io)
obj2 = unpickler.load()

print 'obj2() returns %d' % obj2()

An associate of mine is preparing a minimal pull request. If that looks like it's heading in the right direction, I think that a couple of things could be cleaned up to simplify things. I suggest we get something working first. Then we submit a second pull request with additional suggestions that I think (but am not 100% sure) would be good for the code.

from dill.

mmckerns avatar mmckerns commented on August 17, 2024

@citibob: sounds good. Thanks for the follow-up.

The procedure is as you have posed… a minimal pull request for pull request for a patch… and additional pull requests for additional features. The more atomic, the easier to merge, the less likely that a merge affects others negatively and is off scope, and thus is more likely to get in.

from dill.

mmckerns avatar mmckerns commented on August 17, 2024

closed by merging #24.

from dill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.