4813caaade69050a44979ed878298e3ae89b08eb,sonnet/python/ops/nest.py,,_iterable_like,#Any#Any#,56

Before Change


    `args` with the type of `instance`.
  
  if isinstance(instance, collections.OrderedDict):
    return collections.OrderedDict(zip(six.iterkeys(instance), args))
  elif isinstance(instance, dict):
    return dict(zip(_sorted(instance), args))
  elif (isinstance(instance, tuple) and
        hasattr(instance, "_fields") and

After Change


    // ordered and plain dicts (e.g., flattening a dict but using a
    // corresponding `OrderedDict` to pack it back).
    result = dict(zip(_sorted(instance), args))
    return type(instance)((key, result[key]) for key in _six.iterkeys(instance))
  elif (isinstance(instance, tuple) and
        hasattr(instance, "_fields") and
        isinstance(instance._fields, _collections.Sequence) and
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepmind/sonnet
Commit Name: 4813caaade69050a44979ed878298e3ae89b08eb
Time: 2017-08-07
Author: noreply@google.com
File Name: sonnet/python/ops/nest.py
Class Name:
Method Name: _iterable_like


Project Name: chainer/chainercv
Commit Name: ec70c8f39d759dfe733286a41c2f49bf6258878c
Time: 2017-07-14
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/sequential_feature_extractor.py
Class Name: SequentialFeatureExtractor
Method Name: __init__


Project Name: deepmipt/DeepPavlov
Commit Name: c15e52623156084fbd74727dd3f34df2825e2ad3
Time: 2018-10-29
Author: yoptar@gmail.com
File Name: deeppavlov/core/common/cross_validation.py
Class Name:
Method Name: calc_cv_score