Skip to content

pprint does not handle circular references #209

@philippjfr

Description

@philippjfr

When there are circular references on a Parameterized object the pretty printing causes a recursion error:

class A(param.Parameterized):
    
    b = param.Parameter()
    
class B(param.Parameterized):
    
    a = param.Parameter()
    
a = A()
b = B(a=a)
a.b = b
a.pprint()

I'd suggest there should be a maximum depth for the pretty printer, anything more than 1 or two levels deep will become unreadable anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: "serialization"pickle, json, script_repr, etc etc - help me name this :)status: discussionDiscussion. Not yet a specific feature/bug. Likely to result in multiple PRs/issues.type-bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions