8000 Overriding parameter value with None in subclass ignored · Issue #97 · holoviz/param · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Overriding parameter value with None in subclass ignored #97
Closed
@philippjfr

Description

@philippjfr

This behavior just bit me. Anyone have a clue why this would be happening?

Test case:

import param

class A(param.Parameterized):

    a = param.Number(default=10)

    def __init__(self, **params):
        super(A, self).__init__(**params)
        print self.a

class B(A):

    a = param.Number(default=None)

    def __init__(self, **params):
        super(B, self).__init__(**params)
        print self.a

a=A()
b=B()

Output:

10
10
10

Metadata

Metadata

Assignees

No one assigned

    Labels

    API breakingAffects the api in a non bug fixy way/consider version or name changecomponent: type/value stuffsystem of parameter type/value checking, inheritnace, etc etcstatus: duplicatetype-bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0