Skip to content
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

Fix Python example class name #1421

Merged
merged 4 commits into from
Mar 24, 2018
Merged

Fix Python example class name #1421

merged 4 commits into from
Mar 24, 2018

Conversation

lucperkins
Copy link
Contributor

The Python interface for Pulsar Functions has changed, and the current Pulsar Functions quick start needs to be changed to reflect this.

@@ -212,9 +212,9 @@ $ touch reverse.py
In that file, add the following:

```python
from pulsarfunction import pulsar_function
from pulsar import Function
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be needed


class Reverse(pulsar_function.PulsarFunction):
class Reverse(Function):
Copy link
Contributor

Choose a reason for hiding this comment

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

class Reverse:
or
class Reverse(Object):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you're right. It won't be needed in this case. I was previously using a context object in this function but decided against it.


class Reverse(pulsar_function.PulsarFunction):
class Reverse(Function):
def __init__(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

We can get rid of __init__ as well

@sijie
Copy link
Member

sijie commented Mar 23, 2018

retest this please

@merlimat merlimat merged commit a4174a5 into apache:master Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants