ebea5c41110303523045f46a0f08bd03101b51d5,python/ray/cloudpickle/cloudpickle_fast.py,,_class_getstate,#Any#,144

Before Change


        (registry, _, _, _) = abc._get_dump(obj)
        clsdict["_abc_impl"] = [subclass_weakref()
                                for subclass_weakref in registry]
    if hasattr(obj, "__slots__"):
        // pickle string length optimization: member descriptors of obj are
        // created automatically from obj"s __slots__ attribute, no need to
        // save them in obj"s state

After Change


        clsdict.pop("_abc_negative_cache", None)
        clsdict.pop("_abc_negative_cache_version", None)
        clsdict.pop("_abc_impl", None)
        registry = clsdict.pop("_abc_registry", None)
        if registry is None:
            // in Python3.7+, the abc caches and registered subclasses of a
            // class are bundled into the single _abc_impl attribute
            if hasattr(abc, "_get_dump"):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ray-project/ray
Commit Name: ebea5c41110303523045f46a0f08bd03101b51d5
Time: 2020-05-29
Author: suquark@gmail.com
File Name: python/ray/cloudpickle/cloudpickle_fast.py
Class Name:
Method Name: _class_getstate


Project Name: keras-team/keras
Commit Name: b95fcf7f52aca8ad0b1afb3cfc64c8eed534fafe
Time: 2017-07-29
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name:
Method Name: check_single_tensor_operation


Project Name: ray-project/ray
Commit Name: f6883bf725caca57bcebcc94aeb93f6a94542984
Time: 2020-03-03
Author: suquark@gmail.com
File Name: python/ray/cloudpickle/cloudpickle_fast.py
Class Name:
Method Name: _class_getstate