Re: raise None

2016-01-03 Thread Christian Gollwitzer
Am 31.12.15 um 16:35 schrieb Steven D'Aprano: But I think it is a real issue. I believe in beautiful tracebacks that give you just the right amount of information, neither too little nor two much. Debugging is hard enough with being given more information than you need and having to decide what b

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Christian Gollwitzer
Am 04.01.16 um 06:29 schrieb Paul Rubin: Chris Angelico writes: On Sun, Jan 3, 2016 at 9:42 PM, Paul Rubin wrote: Chris Angelico writes: If you're not using a GitHub PR, then what you're doing is using GH to host your repository. What's the point of GH in that situation? Mainly hosting,

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 11:42:51 AM UTC+5:30, Dan Sommers wrote: > > I'm saddened but not astonished at just how much opposition there is > > to point (1) ... > > I'll echo the sentiment that we're all adults here, and my opinion that > if you're reading tracebacks, then you want as much inf

Re: raise None

2016-01-03 Thread Dan Sommers
On Mon, 04 Jan 2016 16:19:51 +1100, Steven D'Aprano wrote: > (1) reminding people that the part of the code which determines the > existence of an error need not be the part of the code which actually > calls raise [...] Do chained exceptions scratch your itch? I don't have experience with Pytho

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 10:49:39 AM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > > > If I could have the traceback continue into the C code and tell me the > > line of C code that raised the exception, *that's* what I'd choose. > > If you are serious a

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 10:49:39 AM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > > > If I could have the traceback continue into the C code and tell me the > > line of C code that raised the exception, *that's* what I'd choose. > > If you are serious a

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Paul Rubin
Chris Angelico writes: > On Sun, Jan 3, 2016 at 9:42 PM, Paul Rubin wrote: >> Chris Angelico writes: >>> If you're not using a GitHub PR, then what you're doing is using GH to >>> host your repository. >> What's the point of GH in that situation? > Mainly hosting, plus you can use gh-pages and

Re: raise None

2016-01-03 Thread Steven D'Aprano
On Fri, 1 Jan 2016 09:48 am, Chris Angelico wrote: > On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney > wrote: [...] >> As best I can tell, Steven is advocating a way to obscure information >> from the traceback, on the assumption the writer of a library knows that >> I don't want to see it. >> >> Give

Re: raise None

2016-01-03 Thread Steven D'Aprano
On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > If I could have the traceback continue into the C code and tell me the > line of C code that raised the exception, *that's* what I'd choose. If you are serious about believing this would be a good thing, you can open a ticket on the bug tracker and

Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Random832
Michael Torrie writes: > I noticed this too. Though threading based on message-id is working > quite well, as designed! It doesn't work as well here as elsewhere, though, because message-ids get rewritten by the usenet gateway, so the IDs referenced in people's headers differ depending on whether

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 9:02:16 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jan 4, 2016 at 2:04 PM, Rustom Mody wrote: > > On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano > > wrote: > >> But I think it is a real issue. I believe in beautiful tracebacks that give > >>

Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/03/2016 05:51 PM, Random832 wrote: > Just as a general comment, I note there are now at least four mangled > versions of this subject header, and threading is already fragile enough > on this list. I think in the future it would be best to avoid non-ASCII > characters in subject lines. I no

Re: raise None

2016-01-03 Thread Chris Angelico
On Mon, Jan 4, 2016 at 2:48 PM, Steven D'Aprano wrote: > On Mon, 4 Jan 2016 02:31 pm, Chris Angelico wrote: > >> On Mon, Jan 4, 2016 at 2:04 PM, Rustom Mody wrote: >>> On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano >>> wrote: But I think it is a real issue. I believe

Re: raise None

2016-01-03 Thread Steven D'Aprano
On Mon, 4 Jan 2016 02:31 pm, Chris Angelico wrote: > On Mon, Jan 4, 2016 at 2:04 PM, Rustom Mody wrote: >> On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano >> wrote: >>> But I think it is a real issue. I believe in beautiful tracebacks that >>> give you just the right amount

Re: raise None

2016-01-03 Thread Chris Angelico
On Mon, Jan 4, 2016 at 2:04 PM, Rustom Mody wrote: > On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano wrote: >> But I think it is a real issue. I believe in beautiful tracebacks that give >> you just the right amount of information, neither too little nor two much. >> Debuggi

Re: raise None

2016-01-03 Thread Rustom Mody
On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano wrote: > But I think it is a real issue. I believe in beautiful tracebacks that give > you just the right amount of information, neither too little nor two much. > Debugging is hard enough with being given more information than

Re: What use of 'sum' in this line code?

2016-01-03 Thread Robert
On Sunday, January 3, 2016 at 7:54:13 PM UTC-5, Peter Otten wrote: > Robert wrote: > > > Hi, > > > > I find below code snippet on line: > > > > > > // > > m = 10 > > theta_A = 0.8 > > theta_B = 0.3 > > theta_0 = [theta_A, theta_B] > > > > coin_A = bernoulli(theta_A) > > coin_B = bernou

Re: What use of 'sum' in this line code?

2016-01-03 Thread Peter Otten
Robert wrote: > Hi, > > I find below code snippet on line: > > > // > m = 10 > theta_A = 0.8 > theta_B = 0.3 > theta_0 = [theta_A, theta_B] > > coin_A = bernoulli(theta_A) > coin_B = bernoulli(theta_B) > > xs = map(sum, [coin_A.rvs(m), coin_A.rvs(m), coin_B.rvs(m), coin_A.rvs(m), > co

Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Random832
Just as a general comment, I note there are now at least four mangled versions of this subject header, and threading is already fragile enough on this list. I think in the future it would be best to avoid non-ASCII characters in subject lines. -- https://mail.python.org/mailman/listinfo/python-l

Re: What use of 'sum' in this line code?

2016-01-03 Thread Ben Bacarisse
Robert writes: > I find below code snippet on line: > > // > m = 10 > theta_A = 0.8 > theta_B = 0.3 > theta_0 = [theta_A, theta_B] > > coin_A = bernoulli(theta_A) > coin_B = bernoulli(theta_B) > > xs = map(sum, [coin_A.rvs(m), coin_A.rvs(m), coin_B.rvs(m), > coin_A.rvs(m), coin_B.rvs(m)])

Re: What use of 'sum' in this line code?

2016-01-03 Thread Steven D'Aprano
On Mon, 4 Jan 2016 11:28 am, Robert wrote: > Hi, > > I find below code snippet on line: > > > // > m = 10 > theta_A = 0.8 > theta_B = 0.3 > theta_0 = [theta_A, theta_B] > > coin_A = bernoulli(theta_A) > coin_B = bernoulli(theta_B) > > xs = map(sum, [coin_A.rvs(m), coin_A.rvs(m), coin_

What use of 'sum' in this line code?

2016-01-03 Thread Robert
Hi, I find below code snippet on line: // m = 10 theta_A = 0.8 theta_B = 0.3 theta_0 = [theta_A, theta_B] coin_A = bernoulli(theta_A) coin_B = bernoulli(theta_B) xs = map(sum, [coin_A.rvs(m), coin_A.rvs(m), coin_B.rvs(m), coin_A.rvs(m), coin_B.rvs(m)]) / I see [coin_A.rvs(m)

Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Kevin Walzer
On 1/2/16 11:43 PM, Ben Finney wrote: That and other vendor-locked workflow aspects of GitHub makes it a poor choice for communities that want to retain the option of control over their processes and data. The Tcl community has moved to Fossil with great success: http://www.fossil-scm.org Lig

Re: Consistent error

2016-01-03 Thread Alister
On 03/01/16 16:55, cc.fezer...@gmail.com wrote: On Sunday, January 3, 2016 at 5:14:33 PM UTC+1, Chris Angelico wrote: On Mon, Jan 4, 2016 at 2:59 AM, wrote: Thanks Chris! Don't worry about the indent, will fix it I've rewritten it to this- def get_algorithm_result( numlist ): largest =

Re: Consistent error

2016-01-03 Thread cc . fezeribe
On Sunday, January 3, 2016 at 5:28:49 PM UTC+1, Ian wrote: > On Sun, Jan 3, 2016 at 8:59 AM, wrote: > > Thanks Chris! > > Don't worry about the indent, will fix it > > I've rewritten it to this- > > > > def get_algorithm_result( numlist ): > >> largest = numlist[0] > >> i = 1 > >> while ( i <

Re: Consistent error

2016-01-03 Thread cc . fezeribe
On Sunday, January 3, 2016 at 5:14:33 PM UTC+1, Chris Angelico wrote: > On Mon, Jan 4, 2016 at 2:59 AM, wrote: > > Thanks Chris! > > Don't worry about the indent, will fix it > > I've rewritten it to this- > > > > def get_algorithm_result( numlist ): > >> largest = numlist[0] > >> i = 1 > >>

Re: Consistent error

2016-01-03 Thread Ian Kelly
On Sun, Jan 3, 2016 at 8:59 AM, wrote: > Thanks Chris! > Don't worry about the indent, will fix it > I've rewritten it to this- > > def get_algorithm_result( numlist ): >> largest = numlist[0] >> i = 1 >> while ( i < len(numlist) ): > i = i + 1 >>if ( largest < numlist[i]): >> l

Re: Consistent error

2016-01-03 Thread Chris Angelico
On Mon, Jan 4, 2016 at 2:59 AM, wrote: > Thanks Chris! > Don't worry about the indent, will fix it > I've rewritten it to this- > > def get_algorithm_result( numlist ): >> largest = numlist[0] >> i = 1 >> while ( i < len(numlist) ): > i = i + 1 >>if ( largest < numlist[i]): >> l

Re: Consistent error

2016-01-03 Thread cc . fezeribe
Thanks Chris! Don't worry about the indent, will fix it I've rewritten it to this- def get_algorithm_result( numlist ): > largest = numlist[0] > i = 1 > while ( i < len(numlist) ): i = i + 1 >if ( largest < numlist[i]): > largest = numlist[i] > numlist[i] = numlist[-1]

Re: Ajax Request + Write to Json Extremely Slow (Webpage Crawler)

2016-01-03 Thread Steven D'Aprano
On Sun, 3 Jan 2016 10:03 pm, jonafleura...@gmail.com wrote: > I'm editing a simple scraper that crawls a Youtube video's comment page. > The crawler uses Ajax to page through comments on the page (infinite > scroll) and then saves them to a json file. Even with small number of > comments (< 5), it

Re: GitHub's �pull request� is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/03/2016 08:09 AM, Bernardo Sulzbach wrote: > On Sun, Jan 3, 2016 at 1:05 PM, Michael Torrie wrote: >> kernel development is now exclusively on github. >> > > No it is not. If they have (now) 88 PR is because people don't RTFM. Good to know. -- https://mail.python.org/mailman/listinfo/pyt

Re: GitHub's �pull request� is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/02/2016 09:56 PM, Michael Vilain wrote: > Seriously, don't like git and the gitflow, find a project where they do > things more to your liking. I do like git and the git work-flow. Seems like github is doing an end-run around several of the key features of git and the git work-flow to keep

Re: Consistent error

2016-01-03 Thread Chris Angelico
On Mon, Jan 4, 2016 at 1:35 AM, wrote: > Here's my code in python : > > def get_algorithm_result( numlist ): > largest = numlist[0] > i = 1 > while ( i < len(numlist) ): >if ( largest < numlist[i]): > largest = numlist[i] > i = i + 1 > numlist[i] = numlist[-1] > return

Consistent error

2016-01-03 Thread cc . fezeribe
Good day, please I'm writing the algorithm below in python but unittest keeps giving error no matter how i rewrite it. This is the algorithm:   Create a function get_algorithm_result to implement the algorithm below Get a list of numbers L1, L2, L3LN as argument Assume L1 is the largest,  La

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Chris Angelico
On Sun, Jan 3, 2016 at 9:42 PM, Paul Rubin wrote: > Chris Angelico writes: >> If you're not using a GitHub PR, then what you're doing is using GH to >> host your repository. So yes, you pull into your local repo and then >> push to GH. > > What's the point of GH in that situation? Mainly hosting

Ajax Request + Write to Json Extremely Slow (Webpage Crawler)

2016-01-03 Thread jonafleuraime
I'm editing a simple scraper that crawls a Youtube video's comment page. The crawler uses Ajax to page through comments on the page (infinite scroll) and then saves them to a json file. Even with small number of comments (< 5), it still takes 3+ min for the comments to be added to the json file.

Re: Trailing zeros of 100!

2016-01-03 Thread Tony van der Hoff
On 02/01/16 17:56, Robin Koch wrote: > Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: >> On 02/01/16 16:57, Robin Koch wrote: >>> sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) >> >> But did you actually test it? > > Yes, should work for n >= 1. > > Why do you ask? > >From your orig

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Paul Rubin
Chris Angelico writes: > If you're not using a GitHub PR, then what you're doing is using GH to > host your repository. So yes, you pull into your local repo and then > push to GH. What's the point of GH in that situation? -- https://mail.python.org/mailman/listinfo/python-list

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Chris Angelico
On Sun, Jan 3, 2016 at 8:31 PM, Random832 wrote: > Chris Angelico writes: >> They are. Ultimately, a GitHub pull request is backed by a git pull >> request. > > There is no such thing as a "git pull request", except in the > ordinary english meaning of the word request. It is true that a > pull r

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Chris Angelico
On Sun, Jan 3, 2016 at 8:46 PM, Ben Finney wrote: > Chris Angelico writes: > >> On Sun, Jan 3, 2016 at 7:45 PM, Ben Finney >> wrote: >> > Anyone can take email data from the email server, migrate it to a >> > different implementation of the same email system, keep it running >> > with the same

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Paul Rubin
Random832 writes: > All of that discussion has value, and it's not good to > have any of it locked up in a place that cannot be exported. I have a dim recollection of Python moving from Trac to a proprietary, hosted bug tracker for a while, but now they're back to an open(?) system but are about

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Ben Finney
Chris Angelico writes: > On Sun, Jan 3, 2016 at 7:45 PM, Ben Finney wrote: > > Anyone can take email data from the email server, migrate it to a > > different implementation of the same email system, keep it running > > with the same data and allow the same people to continue interacting > > wit

Re: [python] Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread W. Trevor King
On Sun, Jan 03, 2016 at 04:31:55AM -0500, Random832 wrote: > But there is no command to create a "pull request", nowhere for such > a thing to exist in the repository, etc. There is this [1]. > Also if someone puts through a github pull request and then their > patch is accepted, my understanding

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Random832
Chris Angelico writes: > They are. Ultimately, a GitHub pull request is backed by a git pull > request. There is no such thing as a "git pull request", except in the ordinary english meaning of the word request. It is true that a pull request is, from one angle, a formalized request for someone t

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Chris Angelico
On Sun, Jan 3, 2016 at 7:45 PM, Ben Finney wrote: > Anyone can take email data from the email server, migrate it to a > different implementation of the same email system, keep it running with > the same data and allow the same people to continue interacting with it > as before. > > Those are trait

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Ben Finney
Christian Gollwitzer writes: > There are layers. Below your Python code there is CPython, below that > the C compiler, the OS, and finally the hardware. Yes. There are continual motivations to take the technology at any of those levels and make it less free, make it more locked to single vendors

Re: (Execution) Termination bit, Alternation bit.

2016-01-03 Thread Steven D'Aprano
On Sun, 3 Jan 2016 12:18 pm, Skybuck Flying wrote: > Should be easy to turn that somewhat pseudo code into python code ! :) If it is so easy, why won't you do it? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Christian Gollwitzer
Am 03.01.16 um 09:03 schrieb Ben Finney: Christian Gollwitzer writes: Arguably, the most valuable outcome of the pull request in the end is the patch, which is of course contained in the git repository. Arguably, the most valuable outcome of a database system is the query result, which is of

Re: GitHub's ³pull request² is proprietary lock-in

2016-01-03 Thread Ben Finney
Christian Gollwitzer writes: > Arguably, the most valuable outcome of the pull request in the end is > the patch, which is of course contained in the git repository. Arguably, the most valuable outcome of a database system is the query result, which is of course contained in the result set of tu