-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- iterator version of utils by default, - no i-prefixed functions for iterator versions, - l-prefixed functions for list versions, including lmap(), lfilter() and lzip()
- Loading branch information
Showing
5 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
- added experimental python 3 support | ||
- published idistinct(), isplit(), isplit_at(), isplit_by() | ||
|
||
0.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
from .primitives import * | ||
from .calc import * | ||
from .colls import * | ||
from .decorators import * | ||
from .funcolls import * | ||
from .funcs import * | ||
from .seqs import * | ||
from .types import * | ||
from .strings import * | ||
from .flow import * | ||
from .objects import * | ||
from .namespaces import namespace | ||
from .debug import * | ||
from .primitives import * | ||
import sys | ||
|
||
if sys.version_info[0] == 2: | ||
from .py2 import * | ||
else: | ||
from .py3 import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from .primitives import * | ||
from .calc import * | ||
from .colls import * | ||
from .decorators import * | ||
from .funcolls import * | ||
from .funcs import * | ||
from .seqs import * | ||
from .types import * | ||
from .strings import * | ||
from .flow import * | ||
from .objects import * | ||
from .namespaces import namespace | ||
from .debug import * | ||
from .primitives import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
""" | ||
Rewrite function names to represent Python 3 iterator-by-default interface. | ||
List versions go with l prefix. | ||
""" | ||
from .py2 import * | ||
|
||
# colls | ||
del iteritems | ||
zip_values = izip_values; del izip_values | ||
zip_dicts = izip_dicts; del izip_dicts | ||
|
||
# seqs | ||
lmap, map = map, imap; del imap | ||
lfilter, filter = filter, ifilter; del ifilter | ||
lremove, remove = remove, iremove; del iremove | ||
lkeep, keep = keep, ikeep; del ikeep | ||
lwithout, without = without, iwithout; del iwithout | ||
|
||
lconcat, concat = concat, iconcat; del iconcat | ||
lcat, cat = cat, icat; del icat | ||
lflatten, flatten = flatten, iflatten; del iflatten | ||
lmapcat, mapcat = mapcat, imapcat; del imapcat | ||
|
||
ldistinct, distinct = distinct, idistinct; del idistinct | ||
lsplit, split = split, isplit; del isplit | ||
lsplit_at, split_at = split_at, isplit_at; del isplit_at | ||
lsplit_by, split_by = split_by, isplit_by; del isplit_by | ||
lpartition, partition = partition, ipartition; del ipartition | ||
lchunks, chunks = chunks, ichunks; del ichunks | ||
lpartition_by, partition_by = partition_by, ipartition_by; del ipartition_by | ||
|
||
lreductions, reductions = reductions, ireductions; del ireductions | ||
lsums, sums = sums, isums; del isums | ||
|
||
# py2 re-exports izip, so py3 exports lzip | ||
zip = izip; del izip | ||
def lzip(*seqs): | ||
return list(zip(*seqs)) | ||
|
||
# funcs | ||
ljuxt, juxt = juxt, ijuxt; del ijuxt |