Skip to content

Adding missing __len__ method to dict objects #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

kellrott
Copy link
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
Copy link

codecov bot commented Mar 21, 2022

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 Files Coverage Δ
py/dict.go 77.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.

Copy link
Member

@sbinet sbinet left a comment

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:master Mar 22, 2022
@kellrott kellrott deleted the feature/dict_len branch December 24, 2022 03:20
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.

2 participants