Changeset 9878:80400e49d3a4 in orange


Ignore:
Timestamp:
02/06/12 23:05:15 (2 years ago)
Author:
Matija Polajnar <matija.polajnar@…>
Branch:
default
Message:

Remove arguments from object.new calls. It gives a deprecation warning and has no effects: the arguments get passed anyway.

Files:
16 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/logreg.py

    r9818 r9878  
    195195class LogRegLearnerGetPriors(object): 
    196196    def __new__(cls, instances=None, weightID=0, **argkw): 
    197         self = object.__new__(cls, **argkw) 
     197        self = object.__new__(cls) 
    198198        if instances: 
    199199            self.__init__(**argkw) 
     
    873873class StepWiseFSSFilter(object): 
    874874    def __new__(cls, instances=None, **argkw): 
    875         self = object.__new__(cls, **argkw) 
     875        self = object.__new__(cls) 
    876876        if instances: 
    877877            self.__init__(**argkw) 
  • Orange/doc/modules/fss3.py

    r9671 r9878  
    99class BayesFSS(object): 
    1010  def __new__(cls, examples=None, **kwds): 
    11     learner = object.__new__(cls, **kwds) 
     11    learner = object.__new__(cls) 
    1212    if examples: 
    1313      return learner(examples) 
  • Orange/doc/ofb/bayes.py

    r9671 r9878  
    77class Learner(object): 
    88    def __new__(cls, examples=None, **kwds): 
    9         learner = object.__new__(cls, **kwds) 
     9        learner = object.__new__(cls) 
    1010        if examples: 
    1111            learner.__init__(**kwds) 
  • Orange/doc/ofb/c_nb.htm

    r9671 r9878  
    7070<xmp class="code">class Learner(object): 
    7171    def __new__(cls, examples=None, **kwds): 
    72         learner = object.__new__(cls, **kwds) 
     72        learner = object.__new__(cls) 
    7373        if examples: 
    7474            learner.__init__(**kwds) 
  • Orange/doc/ofb/c_nb_disc.htm

    r9671 r9878  
    2525<xmp class="code">class Learner(object): 
    2626    def __new__(cls, examples=None, name='discretized bayes', **kwds): 
    27         learner = object.__new__(cls, **kwds) 
     27        learner = object.__new__(cls) 
    2828        if examples: 
    2929            learner.__init__(name) # force init 
  • Orange/doc/ofb/c_pythonlearner.htm

    r9671 r9878  
    9494<xmp class="code">class Learner(object): 
    9595    def __new__(cls, examples=None, name='discretized bayes', **kwds): 
    96         learner = object.__new__(cls, **kwds) 
     96        learner = object.__new__(cls) 
    9797        if examples: 
    9898            learner.__init__(name) # force init 
  • Orange/doc/ofb/nbdisc.py

    r9671 r9878  
    77class Learner(object): 
    88    def __new__(cls, examples=None, name='discretized bayes', **kwds): 
    9         learner = object.__new__(cls, **kwds) 
     9        learner = object.__new__(cls) 
    1010        if examples: 
    1111            learner.__init__(name) # force init 
  • Orange/feature/discretization.py

    r9857 r9878  
    144144    def __new__(cls, data=None, features=None, discretize_class=False, method=EqualFreq(n=3)): 
    145145        if data is None: 
    146             self = object.__new__(cls, features=features, discretize_class=discretize_class, method=method) 
     146            self = object.__new__(cls) 
    147147            return self 
    148148        else: 
  • Orange/feature/selection.py

    r9676 r9878  
    290290 
    291291        if data is None: 
    292             self = object.__new__(cls, measure=measure, threshold=threshold) 
     292            self = object.__new__(cls) 
    293293            return self 
    294294        else: 
     
    332332 
    333333        if data is None: 
    334             self = object.__new__(cls, measure=measure, n=n) 
     334            self = object.__new__(cls) 
    335335            return self 
    336336        else: 
     
    368368 
    369369        if data is None: 
    370             self = object.__new__(cls, measure=measure, margin=margin) 
     370            self = object.__new__(cls) 
    371371            return self 
    372372        else: 
     
    414414 
    415415        if data is None: 
    416             self = object.__new__(cls, baseLearner, filter=filter, name=name) 
     416            self = object.__new__(cls) 
    417417            return self 
    418418        else: 
  • Orange/orng/orngMCPrediction.py

    r9671 r9878  
    55class MultiClassPredictionLearner(object): 
    66    def __new__(self, data=None, name='PLS regression', **kwds): 
    7         learner = object.__new__(self, **kwds) 
     7        learner = object.__new__(self) 
    88        if data: 
    99            learner.__init__(name) # force init 
  • Orange/orng/orngMultivariatePrediction.py

    r9671 r9878  
    55    """(self, data, y, x=None)""" 
    66    def __new__(self, data=None, name='multivar pred', **kwds): 
    7         learner = object.__new__(self, **kwds) 
     7        learner = object.__new__(self) 
    88        if data: 
    99            learner.__init__(name) # force init 
  • Orange/orng/orngRegression.py

    r9671 r9878  
    1111class LinearRegressionLearner(object): 
    1212    def __new__(self, data=None, name='linear regression', **kwds): 
    13         learner = object.__new__(self, **kwds) 
     13        learner = object.__new__(self) 
    1414        if data: 
    1515            learner.__init__(name,**kwds) # force init 
     
    236236    """PLSRegressionLearner(data, y, x=None, nc=None)""" 
    237237    def __new__(self, data=None, **kwds): 
    238         learner = object.__new__(self, **kwds) 
     238        learner = object.__new__(self) 
    239239        if data: 
    240240            learner.__init__(**kwds) # force init 
  • docs/reference/rst/code/selection-bayes.py

    r9823 r9878  
    1010class BayesFSS(object): 
    1111    def __new__(cls, examples=None, **kwds): 
    12         learner = object.__new__(cls, **kwds) 
     12        learner = object.__new__(cls) 
    1313        if examples: 
    1414            return learner(examples) 
  • docs/tutorial/rst/code/bayes.py

    r9374 r9878  
    77class Learner(object): 
    88    def __new__(cls, examples=None, **kwds): 
    9         learner = object.__new__(cls, **kwds) 
     9        learner = object.__new__(cls) 
    1010        if examples: 
    1111            learner.__init__(**kwds) 
  • docs/tutorial/rst/code/nbdisc.py

    r9374 r9878  
    77class Learner(object): 
    88    def __new__(cls, examples=None, name='discretized bayes', **kwds): 
    9         learner = object.__new__(cls, **kwds) 
     9        learner = object.__new__(cls) 
    1010        if examples: 
    1111            learner.__init__(name) # force init 
  • docs/tutorial/rst/learners-in-python.rst

    r9386 r9878  
    8282   class Learner(object): 
    8383       def __new__(cls, examples=None, name='discretized bayes', **kwds): 
    84            learner = object.__new__(cls, **kwds) 
     84           learner = object.__new__(cls) 
    8585           if examples: 
    8686               learner.__init__(name) # force init 
Note: See TracChangeset for help on using the changeset viewer.