[issue38637] fix GROWTH_RATE comments bug

2019-10-30 Thread Brandt Bucher


Brandt Bucher  added the comment:

This PR was closed as invalid for the same reasons Steven mentioned above.

--
nosy: +brandtbucher
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38637] fix GROWTH_RATE comments bug

2019-10-29 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Please explain the bug here on the bug tracker, people shouldn't have to drill 
down into the PR to find out what it means.

Before fixing the bug, you should find out whether or not it actually is a bug. 
In my testing, the comment is approximately correct:

py> from random import random
py> d = dict((random(), None) for i in range(20))
py> sys.getsizeof(d)
432
py> while sys.getsizeof(d) == 432:
... d[random()] = None
...
py> sys.getsizeof(d)
816


That looks closer to double than triple to me. Try a larger dict:

py> for i in range(1):
... d[random()] = None
...
py> sys.getsizeof(d)
196656
py> while sys.getsizeof(d) == 196656:
... d[random()] = None
...
py> sys.getsizeof(d)
393264

Still looks like double to me.

Unless an expert on the dict internals agrees with you, the comment is correct, 
it is not a bug, and this issue should be closed.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38637] fix GROWTH_RATE comments bug

2019-10-29 Thread toywei


New submission from toywei :

It also exists in 3.7/3.6/3.3.

--
assignee: docs@python
components: Documentation
messages: 355688
nosy: docs@python, toywei
priority: normal
pull_requests: 16516
severity: normal
status: open
title: fix GROWTH_RATE comments bug
type: resource usage
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com