There's probably some random variation in there...

dict(iterator) or dict(counter) is often the right choice. dict(a=1, b=2)
can often look neater than {'a': 1, 'b': 2}. But for an empty dict, I think
{} is clearest.


On 25 February 2014 12:17, Noel Dawe <notifications@github.com> wrote:

>  In sklearn/cross_validation.py:
>
> > @@ -1190,15 +1199,28 @@ def _fit_and_score(estimator, X, y, scorer, train, test, verbose, parameters,
> >
> >      start_time = time.time()
> >
> > -    X_train, y_train = _safe_split(estimator, X, y, train)
> > -    X_test, y_test = _safe_split(estimator, X, y, test, train)
> > +    X_train, y_train, sample_weight_train = _safe_split(
> > +        estimator, X, y, sample_weight, train)
> > +    X_test, y_test, sample_weight_test = _safe_split(
> > +        estimator, X, y, sample_weight, test, train)
> > +
> > +    test_score_params = dict()
>
> Interesting. Sure. I always use {} but saw in other scikit-learn code the
> use of dict() and list() so I thought that was preferred in scikit-learn.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/1574/files#r10020456>
> .
>