Re: Proposal: === and !=== operators

2014-07-12 Thread Marko Rauhamaa
Chris Angelico : > On Sat, Jul 12, 2014 at 4:11 PM, Ethan Furman wrote: >> class list: >> def __eq__(self, other): >> if len(self) != len(other): >> return False >> for this, that in zip(self, other): >> if this is that or this == that: >>

Re: Proposal: === and !=== operators

2014-07-12 Thread Ethan Furman
On 07/11/2014 11:39 PM, Chris Angelico wrote: On Sat, Jul 12, 2014 at 4:11 PM, Ethan Furman wrote: class list: def __eq__(self, other): if len(self) != len(other): return False for this, that in zip(self, other): if this is that or this == that:

Re: Proposal: === and !=== operators

2014-07-12 Thread Chris Angelico
On Sat, Jul 12, 2014 at 4:53 PM, Ethan Furman wrote: > Because I'm tired, and it seemed like a good excuse to show else with for, > and because I'm tired. :) Excellent justification. I withdraw the criticism. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list

We are looking for talented and motivated PYTHON Developers for our office in Bandung, West Java.

2014-07-12 Thread plog
http://www.voxteneo.com/jobs/#job-indonesia *PYTHON Developers #12* We are looking for talented and motivated PYTHON Developers for our office in Bandung, West Java. We offer a permanent contract with a competitive salary package You will join our team to take charge of analysis and development

Re: Proposal: === and !=== operators

2014-07-12 Thread Steven D'Aprano
On Sat, 12 Jul 2014 01:07:28 -0400, Alan Bawden wrote: > Steven D'Aprano writes: > >> But perhaps we only care about changes in value, not type. NAN or no >> NAN, list equality works fine: >> >> py> data = [1.0, 2.0, float('nan'), 4.0] >> py> old = data[:] >> py> old == data # No changes made

[ANN] pyspread 0.3.1

2014-07-12 Thread Martin Manns
== pyspread 0.3.1 == Pyspread 0.3.1 is released. This is a bugfix release that removes an annoying warning on the console. About pyspread == Pyspread is a non-traditional spreadsheet application that is based on and written in the programming language Pytho

Re: Proposal: === and !=== operators

2014-07-12 Thread Johannes Bauer
On 09.07.2014 11:17, Steven D'Aprano wrote: > People are already having problems, just listen to Anders. He's > (apparently) not doing NAN-aware computations on his data, he just wants > to be able to do something like > > this_list_of_floats == that_list_of_floats This is a horrible example.

Rest WebService Testing using Python

2014-07-12 Thread neeraj . bakhtani
Hi folks, This is Neeraj , I want to develop some standalone python Scripts to Test Rest Webservices i.e. WADL services with endpoints. Particularly I need "A script for logging in would pass the xml to the rest api with variables for all the payload fields python" So Can Anyone please provide

Re: Rest WebService Testing using Python

2014-07-12 Thread Roy Smith
In article , neeraj.bakht...@gmail.com wrote: > Hi folks, > This is Neeraj , I want to develop some standalone python Scripts to Test > Rest Webservices i.e. WADL services with endpoints. > > Particularly I need "A script for logging in would pass the xml to the rest > api with variables for a

Re: Proposal: === and !=== operators

2014-07-12 Thread Steven D'Aprano
On Sat, 12 Jul 2014 13:54:07 +0200, Johannes Bauer wrote: > On 09.07.2014 11:17, Steven D'Aprano wrote: > >> People are already having problems, just listen to Anders. He's >> (apparently) not doing NAN-aware computations on his data, he just >> wants to be able to do something like >> >> this_l

Re: Proposal: === and !=== operators

2014-07-12 Thread Chris Angelico
On Sun, Jul 13, 2014 at 2:35 AM, Steven D'Aprano wrote: > You're not going to hear me arguing that the non-reflexivity of NANs and > SQL NULL is a bad idea, although some very smart people have: > > http://bertrandmeyer.com/2010/02/06/reflexivity-and-other-pillars-of-civilization/ > > Mathematical

Re: Python 3 is killing Python

2014-07-12 Thread pyotr filipivich
Steve Hayes on Sun, 01 Jun 2014 05:05:05 +0200 typed in comp.lang.python the following: >On Sat, 31 May 2014 15:44:46 +0300, Marko Rauhamaa wrote: > >>Steve Hayes : >> >>> I'll leave Python 3.2 on my computer, but 2.7.5 will be the one I'm >>> installing now. Even if I could *find* a book that d

Re: Proposal: === and !=== operators

2014-07-12 Thread Johannes Bauer
On 12.07.2014 18:35, Steven D'Aprano wrote: > If you said, "for many purposes, one should not compare floats for > equality, but should use some sort of fuzzy comparison instead" then I > would agree with you. But your insistence that equality "always" is wrong > takes it out of good advice int

Re: Python 3 is killing Python

2014-07-12 Thread Dan Stromberg
On Wed, May 28, 2014 at 12:23 PM, Larry Martell wrote: > Somthing I came across in my travels through the ether: > > https://medium.com/@deliciousrobots/5d2ad703365d/ Hey kids, maybe if we all chant this enough times, we can make it true! Wouldn't that be fun? -- https://mail.python.org/mailman

Re: Proposal: === and !=== operators

2014-07-12 Thread Roy Smith
In article , Chris Angelico wrote: > And there are plenty of other laws of real numbers that floats violate > (or, let's be generous, "approximate to rather than following > perfectly"). For instance, adding two positive (non-zero) numbers > should result in a number which is greater than eithe

Re: Proposal: === and !=== operators

2014-07-12 Thread Chris Angelico
On Sun, Jul 13, 2014 at 4:14 AM, Johannes Bauer wrote: > Bullshit. Comparing floats by their representation is *generally* a bad > idea because of portability issues. You don't know if IEEE754 is used to > represent floats on the systems that your code is used on. No, you don't, but I think you c

Re: Proposal: === and !=== operators

2014-07-12 Thread Roy Smith
In article , Chris Angelico wrote: > On Sun, Jul 13, 2014 at 4:14 AM, Johannes Bauer wrote: > > Bullshit. Comparing floats by their representation is *generally* a bad > > idea because of portability issues. You don't know if IEEE754 is used to > > represent floats on the systems that your code

Re: Proposal: === and !=== operators

2014-07-12 Thread Chris Angelico
On Sun, Jul 13, 2014 at 9:06 AM, Roy Smith wrote: > But, you can still have: > print x > 1.0 print y > 1.0 print x == y > False > > > which, I know, isn't really what you were talking about, but it is part > of the general confusion of using floats. This is partly because of the oh

codingbat question broken?

2014-07-12 Thread Rodrick Brown
I'm working on the following problem set from codingbat.com http://codingbat.com/prob/p107863 Given 3 int values, a b c, return their sum. However, if one of the values is 13 then it does not count towards the sum and values to its right do not count. So for example, if b is 13, then both b and c

Re: codingbat question broken?

2014-07-12 Thread Chris Angelico
On Sun, Jul 13, 2014 at 12:05 PM, Rodrick Brown wrote: > > Can anyone show me an example where all test are success? No, because that's asking for the answer :) What you need to do is look at the failing test cases, and figure out why your function is giving the wrong result. Do you see what's tr

Re: codingbat question broken?

2014-07-12 Thread Dan Stromberg
This runs on 2.7 or 3.4, unmodified (other than the #!): #!/usr/local/cpython-2.7/bin/python #!/usr/local/cpython-3.4/bin/python def lucky_sum(*list_): lucky_total = 0 for element in list_: if element == 13: break lucky_total += element return lucky_total

Re: codingbat question broken?

2014-07-12 Thread Ian Kelly
On Sat, Jul 12, 2014 at 8:05 PM, Rodrick Brown wrote: > if a == 13: > t = b + c This looks incorrect. So no, I don't think the problem is with codingbat. -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposal: === and !=== operators

2014-07-12 Thread Steven D'Aprano
On Sat, 12 Jul 2014 20:14:32 +0200, Johannes Bauer wrote: > On 12.07.2014 18:35, Steven D'Aprano wrote: > >> If you said, "for many purposes, one should not compare floats for >> equality, but should use some sort of fuzzy comparison instead" then I >> would agree with you. But your insistence th