{"action":"closed","issue":{"url":"https://api.github.com/repos/ReactiveX/RxPY/issues/40","labels_url":"https://api.github.com/repos/ReactiveX/RxPY/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxPY/issues/40/comments","events_url":"https://api.github.com/repos/ReactiveX/RxPY/issues/40/events","html_url":"https://github.com/ReactiveX/RxPY/issues/40","id":68235920,"number":40,"title":"Are streams created from iterables supposed to be exhaustible/mutable?","user":{"login":"hangtwenty","id":2420688,"avatar_url":"https://avatars.githubusercontent.com/u/2420688?v=3","gravatar_id":"","url":"https://api.github.com/users/hangtwenty","html_url":"https://github.com/hangtwenty","followers_url":"https://api.github.com/users/hangtwenty/followers","following_url":"https://api.github.com/users/hangtwenty/following{/other_user}","gists_url":"https://api.github.com/users/hangtwenty/gists{/gist_id}","starred_url":"https://api.github.com/users/hangtwenty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hangtwenty/subscriptions","organizations_url":"https://api.github.com/users/hangtwenty/orgs","repos_url":"https://api.github.com/users/hangtwenty/repos","events_url":"https://api.github.com/users/hangtwenty/events{/privacy}","received_events_url":"https://api.github.com/users/hangtwenty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-14T01:42:30Z","updated_at":"2015-04-14T17:46:00Z","closed_at":"2015-04-14T17:46:00Z","body":"I'm really puzzled by something in RxPY. It seems to be different from RxJS in a crucial way.\r\n\r\nPlease take a look at [my contrived RxJS example on JSFiddle](http://jsfiddle.net/9EjSQ/76/), then look at the equivalent RxPY code below.\r\n\r\nIn the examples, I create a single stream, then create two new streams by transforming it. I subscribe two observers to the streams. In RxJS, I get the result I expect. In RxPY, I get a confusing result.\r\n\r\n```python\r\nimport rx\r\n\r\ndef on_next_1(s):\r\n    print \"subscriber 1: \", s\r\n\r\ndef on_next_2(s):\r\n    print \"subscriber 2: \", s\r\n\r\nns = rx.Observable.from_(['a', 'b', 'c'])\r\n\r\nxs = ns.map(lambda s: s)\r\nys = ns.map(lambda s: s.upper())\r\n\r\nxs.subscribe(on_next_1)\r\nxs.merge(ys).subscribe(on_next_2)\r\n```\r\n\r\nThis RxPY code produces this output:\r\n\r\n```\r\nsubscriber 1:  a\r\nsubscriber 1:  b\r\nsubscriber 1:  c\r\n```\r\n\r\nThis is the output I would expect (just like the RxJS output):\r\n\r\n```\r\nsubscriber 1: a\r\nsubscriber 1: b\r\nsubscriber 1: c\r\nsubscriber 2: a\r\nsubscriber 2: A\r\nsubscriber 2: b\r\nsubscriber 2: B\r\nsubscriber 2: c\r\nsubscriber 2: C\r\n```\r\n\r\nIn the RxPY code, it seems the first observer works, but the second observer gets nothing. It's like the `ns` is a mutable object that is changing in place. But shouldn't each call to `Observable(...).map` return a new `Observable`? Is it really the desired/designed behavior, for `Observable.from_(<a list>)` to fire just once and be exhausted, even when you're deriving more than one new `Observable`s from it?\r\n\r\nI cannot tell if this is a bug, or if I'm missing a fundamental point! It _seems_ like the current behavior violates expectations about the Observer pattern. Isn't the contract, that each subscriber gets each message? What am I missing?"}}