Sergey Astanin avatar Sergey Astanin committed d8367a0

README in rst markup

Comments (0)

Files changed (1)

-python-split -- functions to split and partition sequences
-==========================================================
+============
+python-split
+============
+
+Functions to split and partition sequences.
 
 Installation
 ------------
 
+::
+
     pip install split
 
 Usage
 -----
 
-To partition a sequence into chunks of equal size, use `chop`:
+To partition a sequence into chunks of equal size, use ``chop``::
 
     >>> from split import chop
     >>> list(chop(3, range(10)))
     [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]
 
-If `truncate=True` keyword argument is given, sequence length is
+If ``truncate=True`` keyword argument is given, sequence length is
 truncated to a multiple of chunk size, and all chunks have the same
-size.
+size::
 
     >>> list(chop(3, range(10), truncate=True))
     [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
 
-To split a sequence into two by a given predicate, use `partition`:
+To split a sequence into two by a given predicate, use ``partition``::
 
     >>> from split import partition
     >>> def odd(x): return x%2
     >>> map(list, partition(odd, range(5)))
     [[1, 3], [0, 2, 4]]
 
-To break a sequence into chunks on some separator elements, use `split`:
+To break a sequence into chunks on some separator elements, use ``split``::
 
     >>> list(split(0, [1,2,3,0,4,5,0,0,6]))
     [[1, 2, 3], [4, 5], [], [6]]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.