Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Issues with Self-Referential Benedicts

Closed
#592 0 comments 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 3 days

@fabiocaccamo is already working on this.

Since Jul 21, 2026.

Assessment

This issue has not been assessed yet.

Description

bug

Python version
3.10.13

Package version
0.38.0

Current behavior (bug description)
The Benedict API would be extremely useful for storing and manipulating deeply nested, self-referential data-structures. However, self-referential benedicts sometimes work and sometimes don't.

This works:

from benedict import benedict
test = benedict(keyattr_enabled=True, keyattr_dynamic=True)
test.a.b.c = test

This does not:

from benedict import benedict
test = benedict(keyattr_enabled=True, keyattr_dynamic=True)
test.a.b.c = test
test.a.b.d.e = test

In Jupyter, the latter often leads to kernel crashes or RecursionErrors. It seems that __setitem__ is getting stuck in an infinite loop in traverse.py.

Dominant language
Python
Stars
1.6k
Forks
63
Avg merge
5d 17h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fabiocaccamo/python-benedict

All issues in fabiocaccamo/python-benedict

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.