Re: baffling error-handling problem



Chris Fonnesbeck <fonnesbeck@xxxxxxxxx> writes:

> I thought I knew how to do error handling in python, but apparently I
> dont. I have a bunch of code to calculate statistical likelihoods, and
> use error handling to catch invalid parameters. For example, for the

[...]

> bernoulli distribution, I have:
> I have no idea how this can happen, given how I have coded this.
> Anyone see what I must be missing?

Is it possible you have two classes called LikelihoodError? One in
__main__, one in some_module_of_yours, maybe.

Cheers,
mwh

--
<bruce> how are the jails in israel?
<itamar> well, the one I was in was pretty nice
-- from Twisted.Quotes
.



Relevant Pages

  • Re: [PATCH] mtd: fix memory leaks in phram_setup
    ... bunch of those and put somewhere in lib/. ... error handling always clutters up our nice code. ... end of a function, after the algorithm. ... Bottlenecks ...
    (Linux-Kernel)
  • How can i skip lines under certain conditions
    ... I am writing a script which created multiple processes. ... for error handling, i need to be able to skip a bunch of statements ...
    (comp.lang.tcl)
  • Re: Error Handling with a Match Function.
    ... In the First reply of yours to this question you had mentioned that I dont ... need error handling to do what I want ... >worksheetfunction qualifier. ... Application Property, WorksheetFunction Object, WorksheetFunction Object ...
    (microsoft.public.excel.programming)
  • Test Data Type
    ... Please note that I do not want rely on error handling for this - if the ... AFAIK, if I rely on error handling, then ... call situation - or I'd have to nest a bunch of try... ...
    (microsoft.public.dotnet.languages.csharp)