Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation about weakrefs #77

Open
jrmlhermitte opened this issue Oct 4, 2017 · 2 comments
Open

Documentation about weakrefs #77

jrmlhermitte opened this issue Oct 4, 2017 · 2 comments

Comments

@jrmlhermitte
Copy link
Contributor

We should eventually make sure this gets into the documentation (in reaction to #72)

Something like:

s = Stream()
s2 = s.map(lambda x : x  + 1)
s2.map(print)
s.emit(1)

won't print
but

s = Stream()
s2 = s.map(lambda x : x  + 1)
s2.sink(print)
s.emit(1)

will print.
Also, mention the subtlety that the first code block will print if run in an ipython terminal because the return results are stored in internal variables. (i.e.

In [1]: from streamz import Stream

In [2]: s = Stream()

In [3]: s2 = s.map(lambda x : x+1)

In [4]: s2.map(print)
Out[4]: <streamz.core.map at 0x7fc750b13ba8>

In [5]: _
Out[5]: <streamz.core.map at 0x7fc750b13ba8>
@mrocklin
Copy link
Collaborator

mrocklin commented Oct 4, 2017 via email

@jrmlhermitte
Copy link
Contributor Author

great. let me know if you want assistance. i could write some use case examples that i feel have helped me in the very beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants