You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/09 04:58:52 UTC

[GitHub] [spark] huaxingao commented on issue #25929: [SPARK-29116][PYTHON][ML] Refactor py classes related to DecisionTree

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org