Skip to content

Conversation

@tsnoam
Copy link
Member

@tsnoam tsnoam commented Aug 12, 2017

The idea was nice, but it really complicated things for us and for the
user.
If a user wants to run more than one handler on an update, he can put
the handlers in different groups or he can have a single handler.
If a user wants to have multiple handlers in the same group which only
one of them should run on the update, he should use check_update().

Since we haven't released this code yet, there's no problem with
backward compatability.

The idea was nice, but it really complicated things for us and for the
user.
If a user wants to run more than one handler on an update, he can put
the handlers in different groups or he can have a single handler.
If a user wants to have multiple handlers in the same group which only
one of them should run on the update, he should use check_update().

Since we haven't released this code yet, there's no problem with
backward compatability.
Copy link
Member

@Eldinnie Eldinnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as ever some small docstring changes.

def add_handler(self, handler, group=DEFAULT_GROUP):
"""
Register a handler.
"""Register a handler.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved all docstrings to a newline after """ in all files. Can you please keep that here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed, i followed pep8

except situations when :class:`telegram.DispatcherHandlerContinue` or
:class:`telegram.DispatcherHandlerStop` were raised.
evaluated for handling an update, but only 0 or 1 handler per group will be used. If
:class:`telegram.DispatcherHandlerStop` is raised from one of the handler, no further
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the handlers

which handlers were added to the group defines the priority.
* If :class:`telegram.DispatcherHandlerContinue` was raised, then next handler in the
same group will be called.
* If :class:`telegram.DispatcherHandlerStop` was raised, then zero handlers (even
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bullet for DispatcherHandlerStop is still valid in the docstring?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's kind of duplicate of the paragraph above, don't you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe yes, but now it looks weird as a bullet list for order with just one bullet

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two bullets. see below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two bullets. the code below this patch has a second bullet...

@tsnoam tsnoam merged commit 16a49ec into master Aug 12, 2017
@tsnoam tsnoam deleted the remove_ctrl_cont branch August 12, 2017 15:57
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants