Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fail to extend a Stream with new methods #442

Copy link
Copy link
@florentbr

Description

@florentbr
Issue body actions

Inheritance on a Stream seems to be broken.

The following example fails with 'map' object has no attribute 'draw' :

import streamz

class MyStream(streamz.Stream) :
    def draw(self) :
        print('called draw')

@MyStream.register_api()
class draw(MyStream) :
    def __init__(self, *args, **kwargs) :
        print('called draw')

s = MyStream()
s.map(lambda x : x + 5).draw()
s.emit(99)

I couldn't find a class factory in the source and it looks like all the nodes are instantiated directlly with Stream when it should use the type of the main instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.