6071f7da743458dd89f32c58ead163bfaeebbfb3,mltsp/cfg.py,warn_defaultdict,__getitem__,#warn_defaultdict#Any#,257

Before Change


            // we do *not* want a defaultdict here,
            // otherwise Celery will query it for all
            // possible configuration values
            if key == "celery":
                return item

            if isinstance(item, dict):
                return warn_defaultdict(item)
            else:
                return item

After Change


            print("[config] WARNING: non-existent "
                  "key "{}" requested".format(key))

            self.__setitem__(key, warn_defaultdict())

        return dict.__getitem__(self, key)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cesium-ml/cesium
Commit Name: 6071f7da743458dd89f32c58ead163bfaeebbfb3
Time: 2016-02-10
Author: stefanv@berkeley.edu
File Name: mltsp/cfg.py
Class Name: warn_defaultdict
Method Name: __getitem__


Project Name: scipy/scipy
Commit Name: c29285f1a2d1b053cc1a8fae38eb6a1bbae5a64d
Time: 2014-02-07
Author: pav@iki.fi
File Name: scipy/sparse/dok.py
Class Name: dok_matrix
Method Name: __getitem__


Project Name: scipy/scipy
Commit Name: 5ce91f1cc0d3dcdb8b53c47990774173b82eff62
Time: 2017-08-12
Author: akstrfn@gmail.com
File Name: scipy/sparse/dok.py
Class Name: dok_matrix
Method Name: __getitem__