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:
>>
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:
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
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
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
==
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
23 matches
Mail list logo