Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread David House
2009/8/27 Terry Reedy : > reply-all may send duplicate messages to the author. Not sure of this list. I'm fairly sure Mailman deals with that. -- -David -- http://mail.python.org/mailman/listinfo/python-list

Re: ignored test cases in unittest

2009-08-17 Thread David House
2009/8/16 Terry : > Thanks for the solutions. I think the decorator idea is what I'm look > for:-) Note that the unittest module now supports the `skip' and `expectedFailure' decorators, which seem to describe some of the solutions here. See http://docs.python.org/3.1/library/unittest.html#skipp

Re: what is it, that I don't understand about python and lazy evaluation?

2009-08-13 Thread David House
2009/8/13 Erik Bernoth : > after 14 it is not nessesary to evaluate evens() any further. How does Python know this? I.e. how does it know that evens() will always yield things in ascending order? For example, I could write an iterator like this: def my_iter(): for i in [0,2,4,6,8,10,12,14,16,

Re: try -> except -> else -> except?

2009-07-06 Thread David House
2009/7/6 Python : > as far as I know try has no 'else' It does: http://docs.python.org/reference/compound_stmts.html#the-try-statement > it's 'finally' There is a `finally', too, but they are semantically different. See the above link. -- -David -- http://mail.python.org/mailman/listinfo/pyth

try -> except -> else -> except?

2009-07-06 Thread David House
Hi all, I'm looking for some structure advice. I'm writing something that currently looks like the following: try: except KeyError: else: This is working fine. However, I now want to add a call to a function in the `else' part that may raise an exception, say a ValueError. So I wa