Op 2005-03-22, Bengt Richter schreef <[EMAIL PROTECTED]>:
> On 22 Mar 2005 07:40:50 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> [...]
>>I also was under the impression that a particular part of
>>my program almost doubled in execution time once I replaced
>>the naive dictionary assignment with
On 22 Mar 2005 07:40:50 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
[...]
>I also was under the impression that a particular part of
>my program almost doubled in execution time once I replaced
>the naive dictionary assignment with these self implemented
>methods. A rather heavy burden IMO for so
Op 2005-03-21, Terry Reedy schreef <[EMAIL PROTECTED]>:
>
> "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> For the moment I frequently come across the following cases.
>>
>> 1) Two files, each with key-value pairs for the same dictionary.
>> However it is an error
George Sakkis wrote:
As for naming, I would suggest reset() instead of set(), to emphasize that the
key must be there.
make() is ok; other candidates could be add() or put().
How about 'new' and 'old'?
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
Antoon Pardon wrote:
> Well at least I find them missing.
>
> For the moment I frequently come across the following cases.
>
> 1) Two files, each with key-value pairs for the same dictionary.
> However it is an error if the second file contains a key that
> was not in the first file.
>
> In treati
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> For the moment I frequently come across the following cases.
>
> 1) Two files, each with key-value pairs for the same dictionary.
> However it is an error if the second file contains a key that
> was not in the first fi
On 21 Mar 2005 08:21:40 GMT, Antoon Pardon <[EMAIL PROTECTED]>
wrote:
>Well at least I find them missing.
>
>For the moment I frequently come across the following cases.
>
>1) Two files, each with key-value pairs for the same dictionary.
>However it is an error if the second file contains a key th
Op 2005-03-21, Robert Kern schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> I would say the same reason that we have get. There is no
>> reason to have a builtin get it is easily implemented
>> like this:
>>
>> def get(dct, key, default):
>>
>> try:
>> return dct[key]
>> e
Antoon Pardon wrote:
I would say the same reason that we have get. There is no
reason to have a builtin get it is easily implemented
like this:
def get(dct, key, default):
try:
return dct[key]
except KeyError:
return default
I would go even so far that there is more reason to
Op 2005-03-21, Robert Kern schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> Well at least I find them missing.
>>
>> For the moment I frequently come across the following cases.
>>
>> 1) Two files, each with key-value pairs for the same dictionary.
>> However it is an error if the second fi
Antoon Pardon wrote:
Well at least I find them missing.
For the moment I frequently come across the following cases.
1) Two files, each with key-value pairs for the same dictionary.
However it is an error if the second file contains a key that
was not in the first file.
In treating the second file
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well at least I find them missing.
>
> For the moment I frequently come across the following cases.
>
> 1) Two files, each with key-value pairs for the same dictionary.
> However it is an error if the second file contains
Well at least I find them missing.
For the moment I frequently come across the following cases.
1) Two files, each with key-value pairs for the same dictionary.
However it is an error if the second file contains a key that
was not in the first file.
In treating the second file I miss a 'set' met
13 matches
Mail list logo