Skip to content

Fix Box repr in README - #370

Open
Kernel-Hunter wants to merge 1 commit into
cdgriffith:masterfrom
Kernel-Hunter:readme-box-repr
Open

Kernel-Hunter wants to merge 1 commit into
cdgriffith:masterfrom
Kernel-Hunter:readme-box-repr

Conversation

@Kernel-Hunter

Copy link
Copy Markdown

The comment under the "can be instantiated the same ways as dict" example in the README shows the old repr format. On 8.0.1:

>>> Box({'data': 2, 'count': 5})
Box({'data': 2, 'count': 5})
>>> Box(data=2, count=5)
Box({'data': 2, 'count': 5})
>>> Box({'data': 2, 'count': 1}, count=5)
Box({'data': 2, 'count': 5})
>>> Box([('data', 2), ('count', 5)])
Box({'data': 2, 'count': 5})

The README says # <Box: {'data': 2, 'count': 5}>. I changed it to # Box({'data': 2, 'count': 5}).

I also ran the other README examples (movie_box, small_box, the Config subclass with _box_internal_attrs) and they match. The <Box: ...> lines in docs/4.x_changes.rst describe 4.x output, so I left those.

repr() gives Box({...}), not <Box: {...}>.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant