Re: how can I clear a dictionary in python

2007-04-09 Thread Antoon Pardon
On 2007-04-04, Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Antoon Pardon <[EMAIL PROTECTED]> wrote: >>On 2007-04-03, Aahz <[EMAIL PROTECTED]> wrote: >>> In article <[EMAIL PROTECTED]>, >>> Larry Bates <[EMAIL PROTECTED]> wrote: Aahz wrote: > In article <[EMAIL PROT

Re: how can I clear a dictionary in python

2007-04-09 Thread Antoon Pardon
On 2007-04-04, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: > >> People are often enough not very exact in their communication and >> that goes double for people who are new in a particular subject. >> So I think it is entirely appropiate to think about the real question

Re: how can I clear a dictionary in python

2007-04-04 Thread Steven Howe
Tempest in a teapot guys. Aahz wrote: > In article <[EMAIL PROTECTED]>, > Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> On 2007-04-03, Aahz <[EMAIL PROTECTED]> wrote: >> >>> In article <[EMAIL PROTECTED]>, >>> Larry Bates <[EMAIL PROTECTED]> wrote: >>> Aahz wrote:

Re: how can I clear a dictionary in python

2007-04-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Antoon Pardon <[EMAIL PROTECTED]> wrote: >On 2007-04-03, Aahz <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, >> Larry Bates <[EMAIL PROTECTED]> wrote: >>>Aahz wrote: In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >>

RE: how can I clear a dictionary in python

2007-04-04 Thread Delaney, Timothy (Tim)
Antoon Pardon wrote: > People are often enough not very exact in their communication and > that goes double for people who are new in a particular subject. > So I think it is entirely appropiate to think about the real question > the person is strugling with that hides between the question > actua

Re: how can I clear a dictionary in python

2007-04-04 Thread Antoon Pardon
On 2007-04-03, Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Larry Bates <[EMAIL PROTECTED]> wrote: >>Aahz wrote: >>> In article <[EMAIL PROTECTED]>, >>> Larry Bates <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > > I create a dictionary like this > my

Re: how can I clear a dictionary in python

2007-04-03 Thread Aahz
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Larry Bates <[EMAIL PROTECTED]> wrote: >>> [EMAIL PROTECTED] wrote: I create a dictionary like this myDict = {} and I add entry like this: myDict

Re: how can I clear a dictionary in python

2007-03-29 Thread Alex Martelli
Russ <[EMAIL PROTECTED]> wrote: > This little squabble got me thinking. I normally just use the > myDict={} method of "clearing" a > dictionary when I know there are no other references to it. However, I > wonder how the > efficiency of relying on the garbage collector to clear a dictionary > comp

Re: how can I clear a dictionary in python

2007-03-29 Thread Russ
This little squabble got me thinking. I normally just use the myDict={} method of "clearing" a dictionary when I know there are no other references to it. However, I wonder how the efficiency of relying on the garbage collector to clear a dictionary compares with using the "clear" method. Does anyo

Re: how can I clear a dictionary in python

2007-03-29 Thread Larry Bates
Bruno Desthuilliers wrote: > Larry Bates a écrit : >> Aahz wrote: >>> In article <[EMAIL PROTECTED]>, >>> Larry Bates <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 >

Re: how can I clear a dictionary in python

2007-03-29 Thread Bruno Desthuilliers
Larry Bates a écrit : > Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Larry Bates <[EMAIL PROTECTED]> wrote: >>> [EMAIL PROTECTED] wrote: I create a dictionary like this myDict = {} and I add entry like this: myDict['a'] = 1 but how can I empty the whole dictionar

Re: how can I clear a dictionary in python

2007-03-29 Thread Larry Bates
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Larry Bates <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> I create a dictionary like this >>> myDict = {} >>> >>> and I add entry like this: >>> myDict['a'] = 1 >>> but how can I empty the whole dictionary? >> just point myDict to an emp

Re: how can I clear a dictionary in python

2007-03-28 Thread Steven D'Aprano
On Thu, 29 Mar 2007 01:51:07 +0200, Bjoern Schliessmann wrote: > Aahz wrote: > >> Go back and read Christian's post, then post a followup explaning >> why his solution is better than yours. Your explanation should >> use id(). > > I wonder how you two seem to know exactly what the OP wants ...

Re: how can I clear a dictionary in python

2007-03-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> >> Go back and read Christian's post, then post a followup explaning >> why his solution is better than yours. Your explanation should >> use id(). > >I wonder how you two seem to know exactly what the

Re: how can I clear a dictionary in python

2007-03-28 Thread Bjoern Schliessmann
Aahz wrote: > Go back and read Christian's post, then post a followup explaning > why his solution is better than yours. Your explanation should > use id(). I wonder how you two seem to know exactly what the OP wants ... Regards, Björn -- BOFH excuse #335: the AA battery in the wallclock

Re: how can I clear a dictionary in python

2007-03-28 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? > > Thank you. > just point myDict to an empty dictionary again myDict={} Larry Bates -- http://mail.python.org/mail

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:38, [EMAIL PROTECTED] wrote: > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? Reading the Python docs might help. But before, I would try a dir(myDict). Maybe you will find an

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:48, Larry Bates wrote: > [EMAIL PROTECTED] wrote: >> Hi, >> >> I create a dictionary like this >> myDict = {} >> >> and I add entry like this: >> myDict['a'] = 1 >> but how can I empty the whole dictionary? >> >> Thank you. >> > > just point myDict to an empty dictionary agai

Re: how can I clear a dictionary in python

2007-03-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> >> I create a dictionary like this >> myDict = {} >> >> and I add entry like this: >> myDict['a'] = 1 >> but how can I empty the whole dictionary? > >just point myDict to an empty dictionary again

Re: how can I clear a dictionary in python

2007-03-28 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? >>> help(dict) Help on class dict in module __builtin__: class dict(object) (...) | Methods defined here: (...)

how can I clear a dictionary in python

2007-03-28 Thread Marko . Cain . 23
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict['a'] = 1 but how can I empty the whole dictionary? Thank you. -- http://mail.python.org/mailman/listinfo/python-list