02b3eb5856f9141ac3f6e3d7970e3084449abc2a,dit/exceptions.py,InvalidOutcome,__init__,#InvalidOutcome#,87

Before Change


        
        single = kwargs.get("single", True)
        bad = args[0]
        if single:
            msg = "Outcome {0} is not in the sample space.".format(repr(bad))
        else:
            msg = "Outcomes {0} are not in the sample space.".format(bad)
        args = (msg,) + args
        ditException.__init__(self, *args, **kwargs)

class InvalidNormalization(ditException):

After Change



        
        single = kwargs.get("single", True)
        try:
            bad = args[0]
        except IndexError:
            // Demand a custom message.
            if "msg" in kwargs:
                msg = kwargs["msg"]
            else:
                msg = ""
        else:
            if single:
                msg = "Outcome {0!r} is not in the sample space.".format(bad)
            else:
                msg = "Outcomes {0} are not in the sample space.".format(bad)
        args = (msg,) + args
        ditException.__init__(self, *args, **kwargs)

class InvalidNormalization(ditException):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dit/dit
Commit Name: 02b3eb5856f9141ac3f6e3d7970e3084449abc2a
Time: 2014-04-14
Author: chebee7i@gmail.com
File Name: dit/exceptions.py
Class Name: InvalidOutcome
Method Name: __init__


Project Name: prody/ProDy
Commit Name: 145bfbb31d1a2b11dc241b2567476cd64966b14b
Time: 2012-11-05
Author: lordnapi@gmail.com
File Name: lib/prody/proteins/blastpdb.py
Class Name:
Method Name: blastPDB


Project Name: cornellius-gp/gpytorch
Commit Name: b2951813547426828d313a80c52de8a619e99731
Time: 2018-11-26
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/constant_mul_lazy_tensor.py
Class Name: ConstantMulLazyTensor
Method Name: __init__