Fokko commented on a change in pull request #29122:
URL: https://github.com/apache/spark/pull/29122#discussion_r508857704
##########
File path: python/pyspark/ml/regression.py
##########
@@ -1740,7 +1742,7 @@ class AFTSurvivalRegression(_JavaRegressor,
_AFTSurvivalRegressionParams,
@keyword_only
def __init__(self, *, featuresCol="features", labelCol="label",
predictionCol="prediction",
fitIntercept=True, maxIter=100, tol=1E-6, censorCol="censor",
- quantileProbabilities=list([0.01, 0.05, 0.1, 0.25, 0.5, 0.75,
0.9, 0.95, 0.99]),
+ quantileProbabilities=DEFAULT_QUANTILE_PROBABILITIES,
Review comment:
Bugbear doesn't complain, but you're right:
```
MacBook-Pro-van-Fokko:spark fokkodriesprong$ python3
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 26 2018, 19:50:54)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing import List
>>>
>>> DEFAULT_QUANTILE_PROBABILITIES = [0.01, 0.1, 0.99]
>>>
>>> def mutate_arguments(mutate: List = DEFAULT_QUANTILE_PROBABILITIES):
... mutate.append(22)
... print(mutate)
...
>>> mutate_arguments()
[0.01, 0.1, 0.99, 22]
>>> mutate_arguments()
[0.01, 0.1, 0.99, 22, 22]
>>> mutate_arguments()
[0.01, 0.1, 0.99, 22, 22, 22]
>>> mutate_arguments()
[0.01, 0.1, 0.99, 22, 22, 22, 22]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]