This logic should be done to set an `metric_` (or `effective_metric_`) attribute in the `fit` method. Otherwise it breaks the static curification behavior of the estimator constructors as checked by this failing test:

```
======================================================================
FAIL: sklearn.tests.test_common.test_all_estimators
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/ogrisel/code/scikit-learn/sklearn/tests/test_common.py", line 110, in test_all_estimators
    assert_equal(params[arg], default)
AssertionError: 'euclidean' != 'minkowski'
    "'euclidean' != 'minkowski'" = '%s != %s' % (safe_repr('euclidean'), safe_repr('minkowski'))
    "'euclidean' != 'minkowski'" = self._formatMessage("'euclidean' != 'minkowski'", "'euclidean' != 'minkowski'")
>>  raise self.failureException("'euclidean' != 'minkowski'")
```