cdgriffith / cdgriffith/Box

box_dots does not support keys including numbers

Open
#123 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
2.8k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

Windows 7, Python 3.7.3, Box 4.0.3

```python
#!/usr/bin/env python3

import box

info = box.Box({'uno': {2: 'tres', 'cuatro': 5}}, default_box=True, box_dots=True)

print(info['uno'][2])
# tres

print(info['uno.2'])
# {}
# it should be:
# tres

print(info['uno']['cuatro'])
# 5

print(info.uno.cuatro)
# 5

print(info['uno.cuatro'])
# 5

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.