Skip to content

Commit 1648d31

Browse files
committed
0.15: remove deprecated "getvalue", "runpipe"
Please use "exitpipe" instead; it performs both roles.
1 parent b97a088 commit 1648d31

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

unpythonic/seq.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
__all__ = ["begin", "begin0", "lazy_begin", "lazy_begin0",
55
"pipe1", "piped1", "lazy_piped1",
6-
"pipe", "piped", "getvalue", "lazy_piped", "runpipe", "exitpipe",
6+
"pipe", "piped", "lazy_piped", "exitpipe",
77
"pipec", # w/ curry
88
"do", "do0", "assign"]
99

@@ -12,7 +12,7 @@
1212
from .fun import curry, iscurried
1313
from .dynassign import dyn
1414
from .arity import arity_includes, UnknownArity
15-
from .singleton import Singleton
15+
from .symbol import sym
1616

1717
# sequence side effects in a lambda
1818
def begin(*vals):
@@ -143,16 +143,7 @@ def pipe1(value0, *bodys):
143143
x = update(x)
144144
return x
145145

146-
class Getvalue(Singleton): # singleton sentinel with a nice repr
147-
"""Sentinel; pipe into this to exit a shell-like pipe and return the current value."""
148-
def __repr__(self): # pragma: no cover
149-
return "<sentinel for pipe exit>"
150-
getvalue = Getvalue()
151-
runpipe = getvalue # same thing as getvalue, but semantically better name for lazy pipes
152-
153-
# New unified name for v0.15.0; deprecating the separate "getvalue" and "runpipe" as of v0.14.2.
154-
# TODO: Now that we have symbols, in v0.15.0, change this to `sym("exitpipe")` and delete the `Getvalue` class.
155-
exitpipe = getvalue
146+
exitpipe = sym("exitpipe")
156147

157148
class piped1:
158149
"""Shell-like piping syntax.

0 commit comments

Comments
 (0)