Skip to content

Adding missing __len__ method to dict objects - #171

Merged
sbinet merged 1 commit into
go-python:masterfrom
bmeg:feature/dict_len
Mar 22, 2022
Merged

Adding missing __len__ method to dict objects#171
sbinet merged 1 commit into
go-python:masterfrom
bmeg:feature/dict_len

Conversation

@kellrott

Copy link
Copy Markdown
Contributor

Old behavior:

len({"a" : 1, "b" : 2})

TypeError: "object of type 'dict' has no len()"

New behavior returns the number of elements in the dict

@codecov

codecovBot commented Mar 21, 2022

Copy link
Copy Markdown

Codecov Report

Merging #171 (849af0e) into master (f712a5d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@ Coverage Diff @@## master #171 +/- ##
=======================================
Coverage 72.89% 72.90% =======================================
Files 71 71 Lines 11682 11683 +1 =======================================
+ Hits 8516 8517 +1 
Misses 2595 2595 Partials 571 571 
Impacted FilesCoverage Δ
py/dict.go77.55% <100.00%> (+0.23%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f712a5d...849af0e. Read the comment docs.

@sbinetsbinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sbinet
sbinet merged commit 7da1de0 into go-python:masterMar 22, 2022
@kellrott
kellrott deleted the feature/dict_len branch December 24, 2022 03:20
Sign up for freeto 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.

2 participants

@kellrott@sbinet