Documentation about weakrefs

Open
#77 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

The issue names no documentation file or test; start by locating the project's documentation entry point and the existing Stream and weak-reference guidance. Check the two Python examples in the issue, including the IPython behavior, and consider the work done when the documentation explains why map(print) may not print while sink(print) does.

Written by the indexing model from the issue text.

Description

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>
Dominant language
Python
Stars
1.3k
Forks
149
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-streamz/streamz

All issues in python-streamz/streamz

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.