Skip to content

Commit

Permalink
Merge branch 'release/0.10.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed Sep 21, 2014
2 parents 9b9c18e + 7f28a67 commit 82212d0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion rx/linq/observable/merge.py
Expand Up @@ -28,7 +28,7 @@ def __merge(self, max_concurrent_or_other):
sequences."""

if not isinstance(max_concurrent_or_other, int):
return Observable.merge(max_concurrent_or_other)
return Observable.merge(self, max_concurrent_or_other)

sources = self

Expand Down
26 changes: 13 additions & 13 deletions rx/linq/observable/range.py
Expand Up @@ -8,34 +8,34 @@
@add_metaclass(ExtensionMethod)
class ObservableRange(Observable):
"""Uses a meta class to extend Observable with the methods in this class"""

@classmethod
def range(cls, start, count, scheduler=None):
"""Generates an observable sequence of integral numbers within a
specified range, using the specified scheduler to send out observer
"""Generates an observable sequence of integral numbers within a
specified range, using the specified scheduler to send out observer
messages.
1 - res = Rx.Observable.range(0, 10);
2 - res = Rx.Observable.range(0, 10, Rx.Scheduler.timeout);
1 - res = Rx.Observable.range(0, 10)
2 - res = Rx.Observable.range(0, 10, rx.Scheduler.timeout)
Keyword arguments:
start -- The value of the first integer in the sequence.
count -- The number of sequential integers to generate.
scheduler -- [Optional] Scheduler to run the generator loop on. If not
specified, defaults to Scheduler.currentThread.
Returns an observable sequence that contains a range of sequential
scheduler -- [Optional] Scheduler to run the generator loop on. If not
specified, defaults to Scheduler.current_thread.
Returns an observable sequence that contains a range of sequential
integral numbers.
"""
scheduler = scheduler or current_thread_scheduler

def subscribe(observer):
def action(scheduler, i):
if i < count:
observer.on_next(start + i)
scheduler(i + 1)
else:
observer.on_completed()

return scheduler.schedule_recursive(action, 0)
return AnonymousObservable(subscribe)
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -7,7 +7,7 @@

setup(
name='Rx',
version='0.10.1',
version='0.10.2',
description='Reactive Extensions for Python',
long_description = """\
is a library for composing asynchronous and event-based programs using observable collections and LINQ-style query operators in Python""",
Expand Down

0 comments on commit 82212d0

Please sign in to comment.