Rahul,

Get the source code of Python http://www.python.org/download/releases/
Search for the implementation of dictionary. I believe it should be
Objects/dictobject.c

Now you should be able to try out what you want.

Python core developers maybe smarter but that is no good reason to not try
out ideas (however silly they might seem), else we wouldnt have Stackless
Python or PyPy.

regards,
Rishi



On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu <anandol...@gmail.com>wrote:

> On Wed, Apr 17, 2013 at 9:30 PM, Rahul R <rahul8...@gmail.com> wrote:
>
> > As far as i know, python performs a lazy deletion of values , when we
> > delete content from a dictionary (correct me if i am wrong) .  So, when
> we
> > insert a lot of values the dictionary automatically expands. I don't see
> > dict shrinking when we delete values from dictionary. In such case, is
> > there a way to forcibly reduce the dictionary size ?
> >
>
> Don't try to optimize something that is not required. Python core
> developers are smarted than you, trust them.
>
> Premature optimization is root cause of all evil.
>
> Anand
> _______________________________________________
> BangPypers mailing list
> BangPypers@python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to