Greg Ewing wrote:
> Guido van Rossum wrote:
>> try:
>> hash(x)
>> except TypeError:
>> # apparently x is not hashable
>>
>> then you're also swallowing any type errors in the computation of a
>> legitimate hash function.
>
> Maybe it would help if there were a specific exception,
> such as Not
Guido van Rossum wrote:
> try:
> hash(x)
> except TypeError:
> # apparently x is not hashable
>
> then you're also swallowing any type errors in the computation of a
> legitimate hash function.
Maybe it would help if there were a specific exception,
such as NotHashableError, that hash functi
On 8/13/06, Scott Dial <[EMAIL PROTECTED]> wrote:
> FWIW, I think the logic of swallowing the TypeError is completely
> reasonable.
Then you haven't debugged enough Python programs.
Swallowing an exception of *any* kind is always a trap waiting to shut
when you least expect it, because you have n
I'm not sure if this is a race condition in the test, the test using
SocketServer inappropriately, or if the failure is exposing a problem
in SocketServer.
The issue is that when the second (UDP) server is setup, there is
still a child process from the first (TCP) server. So when the UDP
server c
Jean-Paul Calderone wrote:
> def blacklisted(o):
> try:
> # Is the object contained in the blacklist set?
> return o in _blacklistset
> except TypeError:
> # If it *cannot* be contained in the blacklist set,
> # then it probably isn't.
> return False