apache/spark — pull request #2478 by mattf (2014-09-21 13:53:40+00:00)
Title: [SPARK-3580] add 'partitions' property to PySpark RDD

'rdd.partitions' is available in scala&java, primarily used for its
size() method to get the number of partitions. pyspark instead has a
getNumPartitions() call and no access to 'partitions'

this change adds 'partitions' to pyspark's rdd, allowing for
len(rdd.partitions) to get the number of partitions in a way familiar
to python developers