-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add Branches, Dup; reimplement Parallel #155
Conversation
|
||
Args: | ||
*branches ([:class:`~hybrid.core.Runnable`]): | ||
Runnable branches listed as positional arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalization is inconsistent. Here "branches" but above "Branches". I'd go with branches in all descriptions except references like :class:~hybrid.core.Runnable
because future updates will likely do that (no one reads it all before updating locally) and then where does it all end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches -> plural of noun branch
Branches -> runnable component composed of multiple branches, each branch being of Branch type
That's my reasoning, is it incorrectly applied somewhere?
@@ -260,6 +367,22 @@ def halt(self): | |||
Race = RacingBranches | |||
|
|||
|
|||
class Dup(Runnable, traits.SIMO): | |||
"""Duplicates input :class:`~hybrid.core.State`, n times, into output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not Copy or Duplicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like Dup for now. Short and sweet. It's probably temporary anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
||
def __init__(self, *branches, **runopts): | ||
super(Branches, self).__init__(**runopts) | ||
self.branches = tuple(branches) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*args
maps to a tuple by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I tupleized out of habit. :)
No description provided.