Re: Python not freeing memory (?)

2007-08-12 Thread Chris Fonnesbeck
Martin v. Löwis v.loewis.de> writes: > If you want others to help you in finding the bug, you > need to provide more detail, e.g. a specific piece of > code that reproducibly wastes memory. If you want to > study how Python objects are allocated and released, > you need to create a debug build of

Class decorators do not inherit properly

2007-07-12 Thread Chris Fonnesbeck
I have a class that does MCMC sampling (Python 2.5) that uses decorators -- one in particular called _add_to_post that appends the output of the decorated method to a class attribute. However, when I subclass this base class, the decorator no longer works: Traceback (most recent call last): F

updates in sqlite3 do not work

2007-05-29 Thread Chris Fonnesbeck
I have a script set up to perform UPDATE commands on an sqlite database using the sqlite3 module. Everything appears to run fine (there are no error messages), except that none of the UPDATE commands appear to have actually updated the table. If I run each command on its own in a sqlite session, t

problem including tests in unittest

2006-10-12 Thread Chris Fonnesbeck
class called MCMCTest that is a sublcass of unttest.TestCase, which in turn contains a test method. Yet, unittest seems not to be aware of it. Is there anything I am forgetting? Thanks, Chris -- Chris Fonnesbeck + Atlanta, GA + http://trichech.us -- http://mail.python.org/mailman/listinfo/python

strange unittest issue

2006-09-20 Thread Chris Fonnesbeck
told the "from foo import *" syntax is to be avoided. Any idea why this is not working as expected?C.-- Chris Fonnesbeck + Atlanta, GA + http://trichech.us -- http://mail.python.org/mailman/listinfo/python-list

fundamental issue with unittest

2006-08-08 Thread Chris Fonnesbeck
.main()I appear to be subclassing appropriately, and the only method begins with "test", so I do not see the problem. Can anyone help me out? Thanks,C.-- Chris Fonnesbeck + Atlanta, GA + http://trichech.us -- http://mail.python.org/mailman/listinfo/python-list

unittest ValueError

2006-07-24 Thread Chris Fonnesbeck
method in : runTest I have no idea why this is happening. My TestCase class begins with "test", the method begins with "test", yet no tests are seen. Also, I do not get the runTest ValueError. I assumed that you get this method for free win TestCase. The examples certainly do not h

baffling error-handling problem

2005-07-28 Thread Chris Fonnesbeck
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: def bernoulli_like(self, x, p, name='bernoulli'):

curious problem with large numbers

2005-04-07 Thread Chris Fonnesbeck
I have been developing a python module for Markov chain Monte Carlo estimation, in which I frequently compare variable values with a very large number, that I arbitrarily define as: inf = 1e1 However, on Windows (have tried on Mac, Linux) I get the following behaviour: >>> inf = 1e1 >>>