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

[Bug] Camel killer box and box dots gives unexpected behaviour

Open
#300 0 comments 0 reactions 0 assignees View on GitHub

@Jerry-val is already working on this.

Since Sep 7, 2026.

  • #324 by @Jerry-val — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by reproducing the five accesses shown with Box({"someKey": ["a"]}, camel_killer_box=True, box_dots=True), comparing the results for snake_case, camelCase, and capitalized keys. Determine the intended behavior for each lookup, then add regression coverage for the agreed behavior and verify the inconsistent BoxKeyError case is resolved.

Written by the indexing model from the issue text.

Description

Hello! Thank you for this awesome package. The combination of camel killer box and box dots does exactly what I'm looking for. Well, almost - there's a couple of behaviours that are not working quite as I expected. I'm not sure how many of these are bugs or just my expectations are wrong but hopefully you can explain!

from box import Box

b = Box({"someKey": ["a"]}, camel_killer_box=True, box_dots=True)
b["some_key"]
# works as expected: BoxList(['a'])

b["some_key[0]"]
# works as expected: 'a'

b["someKey"]
# works but I don't know if it should? From the docs it sounds like the original camel-case
# version should have been destroyed completely, but this gives BoxList(['a'])

b["someKey[0]"]
# raises BoxKeyError - not sure whether this should work, but given that just "someKey" worked above
# it feels inconsistent at any rate

b["SomeKey"]
# works but I wouldn't expect it to! Is this meant to work?
Dominant language
Python
Stars
2.8k
Forks
138
PR merge metrics
No merged PRs in 30d

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 cdgriffith/Box

All issues in cdgriffith/Box

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.