python/pyspark/rdd.py
def glom(self):
        """
        Return an RDD created by coalescing all elements within each partition
        into a list.

        >>> rdd = sc.parallelize([1, 2, 3, 4], 2)
        >>> sorted(rdd.glom().collect())
        [[1, 2], [3, 4]]
        """
        def func(iterator): yield list(iterator)
        return self.mapPartitions(func)

        Return an RDD created by coalescing all elements within each partition
        into a list.

        >>> rdd = sc.parallelize([1, 2, 3, 4], 2)
        >>> sorted(rdd.glom().collect())
        [[1, 2], [3, 4]]
        
Return an RDD created by coalescing all elements within each partition
into a list.


Return an RDD created by coalescing all elements within each partition into a list .
def glom(self):
        def func(iterator): yield list(iterator)
        return self.mapPartitions(func)
def glom ( self ) : def func ( iterator ) : yield list ( iterator ) return self . mapPartitions ( func )
Return an RDD created by coalescing all elements within each partition
into a list.
Return an RDD created by coalescing all elements within each partition into a list .
"""
        Return an RDD created by coalescing all elements within each partition
        into a list.

        >>> rdd = sc.parallelize([1, 2, 3, 4], 2)
        >>> sorted(rdd.glom().collect())
        [[1, 2], [3, 4]]
        """
self