huaxingao commented on issue #25929: [SPARK-29116][PYTHON][ML] Refactor py classes related to DecisionTree URL: https://github.com/apache/spark/pull/25929#issuecomment-539830362 @zhengruifeng Thanks for your comments. I didn't add _single_leading_underscore for classes that are used for other packages. I am a little fuzzy about this _single_leading_underscore usage: In https://pep8.org/#descriptive-naming-styles, it has ```_single_leading_underscore: weak “internal use” indicator. E.g. from M import * does not import objects whose name starts with an underscore.``` It makes me feel that the class with _single_leading_underscore is for internal use only. It is not intended to be used in other packages. However, if I explicitly import the _single_leading_underscore class, it works OK. For example, If I do ```from pyspark.ml.tree import *```, the _single_leading_underscore class is not imported. If I do ```from pyspark.ml.tree import _DecisionTreeModel, _DecisionTreeParams```, these classes are imported OK.
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
