82a1499783ede1f2a0894de524df92a931a86e77,rllab/core/serializable.py,Serializable,clone,#Any#Any#,50

Before Change


    def clone(cls, obj, **kwargs):
        assert isinstance(obj, Serializable)
        d = obj.__getstate__()
        d["__kwargs"] = dict(d["__kwargs"], **kwargs)
        out = type(obj).__new__(type(obj))
        out.__setstate__(d)
        return out

After Change


        in_order_args = spec.args[1:]

        d["__args"] = list(d["__args"])
        for kw, val in kwargs.items():
            if kw in in_order_args:
                d["__args"][in_order_args.index(kw)] = val
            else:
                d["__kwargs"][kw] = val

        out = type(obj).__new__(type(obj))
        out.__setstate__(d)
        return out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: rlworkgroup/garage
Commit Name: 82a1499783ede1f2a0894de524df92a931a86e77
Time: 2017-07-18
Author: haarnoja@users.noreply.github.com
File Name: rllab/core/serializable.py
Class Name: Serializable
Method Name: clone


Project Name: rlworkgroup/garage
Commit Name: 82a1499783ede1f2a0894de524df92a931a86e77
Time: 2017-07-18
Author: haarnoja@users.noreply.github.com
File Name: rllab/core/serializable.py
Class Name: Serializable
Method Name: clone


Project Name: pyannote/pyannote-audio
Commit Name: a7e7045b38fb48f347f3f7b8b15129df57475d79
Time: 2016-12-15
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/callbacks.py
Class Name: SpeakerRecognitionValidation
Method Name: on_epoch_end


Project Name: PyMVPA/PyMVPA
Commit Name: 14864b1bca5e89a7872d7ad5d54ee07aea59fdc7
Time: 2012-09-07
Author: debian@onerussian.com
File Name: mvpa2/misc/surfing/queryengine.py
Class Name: SurfaceVerticesQueryEngine
Method Name: train