19f160b307515b3c0868915d0f044332bba109e0,skbio/util/_misc.py,,find_sentinels,#Any#Any#,37

Before Change


            if param.default is sentinel:
                keys.append(name)
    else:  // Py2
        function_spec = inspect.getargspec(function)
        if function_spec.defaults is not None:
            // Concept from http://stackoverflow.com/a/12627202/579416
            keywords_start = -len(function_spec.defaults)
            for key, default in zip(function_spec.args[keywords_start:],

After Change



def find_sentinels(function, sentinel):
    params = inspect.signature(function).parameters
    return [name for name, param in params.items()
            if param.default is sentinel]


class MiniRegistry(dict):
    def __call__(self, name):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: biocore/scikit-bio
Commit Name: 19f160b307515b3c0868915d0f044332bba109e0
Time: 2016-03-24
Author: jai.rideout@gmail.com
File Name: skbio/util/_misc.py
Class Name:
Method Name: find_sentinels


Project Name: pymc-devs/pymc3
Commit Name: 9e1cd02d85d9534a2aec674fdf3445f7b7197914
Time: 2015-06-07
Author: jsalvatier@gmail.com
File Name: pymc3/model.py
Class Name: MultiObservedRV
Method Name: __init__


Project Name: chainer/chainerrl
Commit Name: 5c9cb731fc4ba002e56297d7543de11d503094f0
Time: 2017-01-30
Author: muupan@gmail.com
File Name: chainerrl/links/sequence.py
Class Name: Sequence
Method Name: __init__