Github user ScrapCodes commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1354#discussion_r14810364
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -509,7 +522,8 @@ def sortByKey(self, ascending=True, numPartitions=None, 
keyfunc = lambda x: x):
             >>> tmp2 = [('Mary', 1), ('had', 2), ('a', 3), ('little', 4), 
('lamb', 5)]
             >>> tmp2.extend([('whose', 6), ('fleece', 7), ('was', 8), 
('white', 9)])
             >>> sc.parallelize(tmp2).sortByKey(True, 3, keyfunc=lambda k: 
k.lower()).collect()
    -        [('a', 3), ('fleece', 7), ('had', 2), ('lamb', 5), ('little', 4), 
('Mary', 1), ('was', 8), ('white', 9), ('whose', 6)]
    +        [('a', 3), ('fleece', 7), ('had', 2), ('lamb', 5), ('little', 4), 
('Mary', 1), \
    +('was', 8), ('white', 9), ('whose', 6)]
    --- End diff --
    
    Pep8 does not like very long lines. Other option was to change the test
    case. I am not sure if we can ask it to ignore one line in comments.
    On Jul 11, 2014 12:35 PM, "Reynold Xin" <notificati...@github.com> wrote:
    
    > In python/pyspark/rdd.py:
    >
    > > @@ -509,7 +522,8 @@ def sortByKey(self, ascending=True, 
numPartitions=None, keyfunc = lambda x: x):
    > >          >>> tmp2 = [('Mary', 1), ('had', 2), ('a', 3), ('little', 4), 
('lamb', 5)]
    > >          >>> tmp2.extend([('whose', 6), ('fleece', 7), ('was', 8), 
('white', 9)])
    > >          >>> sc.parallelize(tmp2).sortByKey(True, 3, keyfunc=lambda k: 
k.lower()).collect()
    > > -        [('a', 3), ('fleece', 7), ('had', 2), ('lamb', 5), ('little', 
4), ('Mary', 1), ('was', 8), ('white', 9), ('whose', 6)]
    > > +        [('a', 3), ('fleece', 7), ('had', 2), ('lamb', 5), ('little', 
4), ('Mary', 1), \
    > > +('was', 8), ('white', 9), ('whose', 6)]
    >
    > is this supposed to be like this?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/1354/files#r14809046>.
    >


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to