Re: When to use assert

2013-11-18 Thread Robert Day
On 17/11/13 13:33, Roy Smith wrote: Every once in a while, I'll get into a situation where something is happening that I just can't understand. If a given pice of code is being called, there's NO WAY the program should be exhibiting the behavior it's exhibiting. But, there's also NO WAY that p

Re: To whoever hacked into my Database

2013-11-16 Thread Robert Day
On 11/11/13 09:36, Νίκος Αλεξόπουλος wrote: Tell the mighty female hacker to polish her nails, do her hair and fix a good meal. Nikos, I'm afraid I'm not very impressed by this misogynist nonsense you keep coming out with about how your supposed female hacker ought to be doing stereotypica

Re: converting letters to numbers

2013-10-08 Thread Robert Day
On 08/10/13 15:28, kjaku...@gmail.com wrote: I have to define a function add(c1, c2), where c1 and c2 are capital letters; the return value should be the sum (obtained by converting the letters to numbers, adding mod 26, then converting back to a capital letter). Can you give some expected out

Re: Formal-ity and the Church-Turing thesis

2013-10-08 Thread Robert Day
On 08/10/13 14:11, Steven D'Aprano wrote: On Tue, 08 Oct 2013 18:16:01 +0530, Ravi Sahni wrote: Presently Sir, I wish to ask single question: What you mean "wave our hands"?? It is an idiom very common in Australia. (It may not be well known in the rest of the English-speaking world.) It mea

Re: Unittest - testing for filenames and filesize

2012-08-24 Thread Robert Day
On Fri, 2012-08-24 at 09:20 -0700, Tigerstyle wrote: > def test_3(self): > f = open("test.dat", "wb") > filesize = b"0"*100 > f.write(filesize) > f.close() > self.assertEqual(os.stat, filesize) > The test_3 is to test if the created binary file har