← Winnitude! Search  ·  Reader Mode (1115 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 37 LINKS

Adding missing __len__ method to dict objects by kellrott · Pull Request #171 · go-python/gpython

Repository navigation

Adding missing __len__ method to dict objects - #171


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

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

Conversation

kellrott commented Mar 21, 2022



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

Adding missing __len__ method to dict objects 849af0e

codecov
Bot
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 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 .

sbinet approved these changes Mar 22, 2022
View reviewed changes

sbinet 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 merged commit 7da1de0 into go-python : master Mar 22, 2022 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

2 participants