Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Chris Angelico
On Tue, May 12, 2015 at 4:42 PM, Rustom Mody wrote: > And related to that (and one reason a pure functional language is good for > pedagogy): NO PRINT statement > It may seem trivial but beginning students have a real hard writing clean > structured code. Tabooing prints helps get there faster >

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Rustom Mody
On Tuesday, May 12, 2015 at 11:09:01 AM UTC+5:30, Rustom Mody wrote: > The difference between C/Lisp (I club them together) and python is that > the former are more heroic. > > Like mountain climbing you can get a high, a thrill, even 'see God'¹ but > you can also break your back or worse. > > P

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Rustom Mody
On Tuesday, May 12, 2015 at 10:34:32 AM UTC+5:30, Michael Torrie wrote: > On 05/11/2015 08:04 PM, Steven D'Aprano wrote: > > On Tue, 12 May 2015 05:01 am, beliavsky wrote: > > > >> Yale has taken the unusual step of outsourcing its introductory CS class > >> to Harvard, which uses C as the main la

Re: anomaly

2015-05-11 Thread Gregory Ewing
Steven D'Aprano wrote: With programming languages, the designer can take the same route as Pascal or Java, and define standard functions as keywords that cannot be shadowed or redefined. Nit: Pascal's standard types and functions are not reserved words, they're predeclared identifiers, much as

Re: anomaly

2015-05-11 Thread alex23
On 12/05/2015 1:39 AM, zipher wrote: On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote: That Python, like COBOL, is an eminently practical language. LOL! Good one. I would make an incredibly substantial wager that you've never developed anything of note in either Python or

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Michael Torrie
On 05/11/2015 08:04 PM, Steven D'Aprano wrote: > On Tue, 12 May 2015 05:01 am, beliav...@aol.com wrote: > >> Yale has taken the unusual step of outsourcing its introductory CS class >> to Harvard, which uses C as the main language in its CS50 class. > > And another generation of new programmers w

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Tue, 12 May 2015 06:48 am, Mel Wilson wrote: > On Tue, 12 May 2015 02:35:23 +1000, Steven D'Aprano wrote: > >> On Mon, 11 May 2015 11:37 pm, Mel Wilson wrote: >> >>> On Sun, 10 May 2015 14:12:44 -0500, boB Stepp wrote: >>> I have to admit being surprised by this, too. I am just now stud

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Steven D'Aprano
On Tue, 12 May 2015 05:01 am, beliav...@aol.com wrote: > Yale has taken the unusual step of outsourcing its introductory CS class > to Harvard, which uses C as the main language in its CS50 class. And another generation of new programmers will be irreversibly damaged by exposure to C... -- Ste

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Tue, 12 May 2015 02:43 am, zipher wrote: > For example, have you ever contemplated this: > > class WeightedVertex(vertex_common(Vertex(dict))): > """test class""" No. > That currently isn't valid Python code, Yes it is. You just have to arrange matters so that vertex_common(Vertex(dict))

Re: How to properly apply OOP in the bouncing ball code

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 7:25:09 PM UTC-5, Dennis Lee Bieber wrote: > On Mon, 11 May 2015 08:33:56 -0700 (PDT), zipher > declaimed the following: > >You are making a error that few in the programming community have caught up > >to. OOP design for *data abstraction* is a completely different be

Re: anomaly

2015-05-11 Thread Emile van Sebille
On 5/11/2015 8:34 AM, Grant Edwards wrote: > Yow! YOU PICKED KARL > MALDEN'S NOSE!! I'd bet most people familiar with Karl Malden wouldn't have a problem picking his from a selection of twenty random noses. :) Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-11 Thread Mel Wilson
On Tue, 12 May 2015 02:35:23 +1000, Steven D'Aprano wrote: > On Mon, 11 May 2015 11:37 pm, Mel Wilson wrote: > >> On Sun, 10 May 2015 14:12:44 -0500, boB Stepp wrote: >> >>> I have to admit being surprised by this, too. I am just now studying >>> on how to write my own classes in Python, and hav

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread beliavsky--- via Python-list
On Sunday, May 10, 2015 at 9:38:38 PM UTC-4, Ian wrote: > On Sun, May 10, 2015 at 3:16 PM, Marko Rauhamaa wrote: > > Scheme is my favorite language. I think, however, it is a pretty > > advanced language and requires a pretty solid basis in programming and > > computer science. > > > > Python, in

Re: Responding to Raju and friends at Intsystech...

2015-05-11 Thread David H. Lipman
From: "Skip Montanaro" On Mon, May 11, 2015 at 11:12 AM, nagaraju thoudoju wrote: Please find the requirement below and let me know you interest on this position So this Raju fellow wants to know our "interest on [sic] this position," and he's not responded appropriately to anyone's pl

Responding to Raju and friends at Intsystech...

2015-05-11 Thread Skip Montanaro
> On Mon, May 11, 2015 at 11:12 AM, nagaraju thoudoju > wrote: >> >> Please find the requirement below and let me know you interest on >> this position So this Raju fellow wants to know our "interest on [sic] this position," and he's not responded appropriately to anyone's pleas to stop spamm

Re: Immediate Hire: Sr. Java Software Engineer - Oklahoma - GC, US Citizens Onlt

2015-05-11 Thread David H. Lipman
From: "Larry Martell" I am only interested in work that I can do remotely from home. If you have any opportunities like that, please contact me. Please do not engage spammers or quote spam. -- Dave Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk http://www.pctipp.ch/downloads/dl/

Re: Immediate Hire: Sr. Java Software Engineer - Oklahoma - GC, US Citizens Onlt

2015-05-11 Thread Michiel Overtoom
On May 11, 2015, at 17:12, nagaraju thoudoju wrote: > Job Description - Sr. Java Software Engineer This is a Python mailinglist, not a Java one. -- "You can't actually make computers run faster, you can only make them do less." - RiderOfGiraffes -- https://mail.python.org/mailman/listinfo/

Re: Immediate Hire: Sr. Java Software Engineer - Oklahoma - GC, US Citizens Onlt

2015-05-11 Thread Larry Martell
I am only interested in work that I can do remotely from home. If you have any opportunities like that, please contact me. On Mon, May 11, 2015 at 11:12 AM, nagaraju thoudoju wrote: > Hi, > > Hope you are doing well, > > Please find the requirement below and let me know you interest on this > po

Re: code blocks

2015-05-11 Thread Peter Otten
Chris Angelico wrote: > On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote: >> Though interestingly, my Py2 doesn't have any help >>> on exec: >>> >> help('exec') >>> no documentation found for 'exec' >>> >>> Not sure why that is. >> >> Path confusion? You may accidentally b

Re: code blocks

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 11:08:14 AM UTC-5, Chris Angelico wrote: > On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote: > > Though interestingly, my Py2 doesn't have any help > >> on exec: > >> > > help('exec') > >> no documentation found for 'exec' > >> > >> Not sure why t

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 10:49:01 AM UTC-5, Skip Montanaro wrote: > On Mon, May 11, 2015 at 10:11 AM, zipher wrote: > > I also bought the idea of everything as an object, it has a unbeatable > > purity to it. But we won't ever get to the point were OOP is like the > > purity of math because t

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Mon, 11 May 2015 11:37 pm, Mel Wilson wrote: > On Sun, 10 May 2015 14:12:44 -0500, boB Stepp wrote: > >> I have to admit being surprised by this, too. I am just now studying on >> how to write my own classes in Python, and have come to realize that >> doing this is *possible*, but the *surpris

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Rustom Mody
On Monday, May 11, 2015 at 8:05:56 PM UTC+5:30, Grant Edwards wrote: > On 2015-05-11, Skip Montanaro wrote: > > > Don't CS departments still have a computer languages survey class? When I > > was a graduate student at Iowa in the early 80s, we had one. (It was, as I > > recall, an upper level und

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 10:44:51 AM UTC-5, Steven D'Aprano wrote: > On Mon, 11 May 2015 11:27 pm, Antoon Pardon wrote: > > > The point is that all too often someone wants to defend a specific choice > > the developers have made and cites some general rule or principle in > > support, ignoring t

Re: anomaly

2015-05-11 Thread Mark Lawrence
On 11/05/2015 16:48, Skip Montanaro wrote: On Mon, May 11, 2015 at 10:11 AM, zipher wrote: I also bought the idea of everything as an object, it has a unbeatable purity to it. But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is workin

Re: code blocks

2015-05-11 Thread Chris Angelico
On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote: > Though interestingly, my Py2 doesn't have any help >> on exec: >> > help('exec') >> no documentation found for 'exec' >> >> Not sure why that is. > > Path confusion? You may accidentally be importing Python 3's topics. > T

Re: code blocks

2015-05-11 Thread Peter Otten
Chris Angelico wrote: > On Tue, May 12, 2015 at 1:22 AM, zipher wrote: >> Ah, yeah, I guess that does it. But (shame) it looks like you've gone >> past the BDFL. Try: >> > help(exec) >> ^ >> SyntaxError: invalid syntax >> > > That's because, in the version of Python you're usin

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Tue, 12 May 2015 12:23 am, zipher wrote: > On Monday, May 11, 2015 at 1:11:26 AM UTC-5, Steven D'Aprano wrote: >> On Monday 11 May 2015 10:57, zipher wrote: >> > I guess everyone expects this behavior since Python implemented this >> > idea of "everything is an object", but I think this branch

Re: anomaly

2015-05-11 Thread Skip Montanaro
On Mon, May 11, 2015 at 10:11 AM, zipher wrote: > I also bought the idea of everything as an object, it has a unbeatable purity > to it. But we won't ever get to the point were OOP is like the purity of > math because the greatest utility of OOP is working with real-world data. > And that rea

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Mon, 11 May 2015 11:27 pm, Antoon Pardon wrote: > The point is that all too often someone wants to defend a specific choice > the developers have made and cites some general rule or principle in > support, ignoring the fact that python breaks that rule/principle in other > area's. "It's a fre

Re: code blocks

2015-05-11 Thread Chris Angelico
On Tue, May 12, 2015 at 1:22 AM, zipher wrote: > Ah, yeah, I guess that does it. But (shame) it looks like you've gone past > the BDFL. Try: > help(exec) > ^ > SyntaxError: invalid syntax > That's because, in the version of Python you're using, exec is a keyword. You could swi

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote: > On 2015-05-11, Skip Montanaro wrote: > >> Python is in production use in hundreds of thousands of > >> organisations. It has been heavily used for over twenty years, in > >> everything from quick and dirty one line scripts to hun

Re: anomaly

2015-05-11 Thread Grant Edwards
On 2015-05-11, Skip Montanaro wrote: >> Python is in production use in hundreds of thousands of >> organisations. It has been heavily used for over twenty years, in >> everything from quick and dirty one line scripts to hundred-thousand >> LOC applications. > > Mark> Yeah, so was COBOL. Boom. >

Re: How to properly apply OOP in the bouncing ball code

2015-05-11 Thread zipher
On Friday, May 8, 2015 at 10:40:46 AM UTC-5, Tommy C wrote: > I'm trying to apply OOP in this bouncing ball code in order to have multiple > balls bouncing around the screen. The objective of this code is to create a > method called settings, which controls all the settings for the screen and >

Re: code blocks

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 10:22:15 AM UTC-5, zipher wrote: > Ah, yeah, I guess that does it. But (shame) it looks like you've gone past > the BDFL. Try: > [...] > Better Oops, omit word "better". Sent before reading over it again... m -- https://mail.python.org/mailman/listinfo/python-list

Re: code blocks

2015-05-11 Thread zipher
On Sunday, May 10, 2015 at 10:32:07 PM UTC-5, Ian wrote: > On Sun, May 10, 2015 at 7:39 PM, zipher wrote: > > Similarly, you'd want: > > > encode(codestr) > > > > to instantiate all objects in the codestr. You can't do this with eval, > > because it doesn't allow assignment (eval(n=2) retur

[RELEASE] Python 2.7.10 release candidate 1

2015-05-11 Thread Benjamin Peterson
It is my privilege to announce the first release candidate of 2.7.10, the next bugfix release in the 2.7 series. Downloads are at https://www.python.org/downloads/release/python-2710rc1/ The full changelog is at https://hg.python.org/cpython/raw-file/80ccce248ba2/Misc/NEWS Please conside

Re: How to properly apply OOP in the bouncing ball code

2015-05-11 Thread Tommy C
Thanks for your help. I have updated the code as follows, there are no more errors but the images will not move at all, as all the images are staying at the upper left corner. Please advice, thanks. import sys, pygame pygame.init() size = width, height = 800, 600 black = [0,0,0] screen =

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 9:52:16 AM UTC-5, Skip Montanaro wrote: > Steven> Python is in production use in hundreds of thousands of > organisations. It > Steven> has been heavily used for over twenty years, in everything > from quick and > Steven> dirty one line scripts to hundred-thousand LOC app

Immediate Hire: Sr. Java Software Engineer - Oklahoma - GC, US Citizens Onlt

2015-05-11 Thread nagaraju thoudoju
Hi, Hope you are doing well, Please find the requirement below and let me know you interest on this position on nagar...@intsystech.com or feel free to call me on my D:908-333-3534. Requirement: Job Description - Sr. Java Software Engineer Location: Edmond, Oklahoma Responsibilities: Pr

Re: Calling a function is faster than not calling it?

2015-05-11 Thread Skip Montanaro
On Mon, May 11, 2015 at 10:01 AM, BartC wrote: > (1) It has an extra argument ('code'), in addition to any normal arguments > of func (0 in this case) Which might well push execution down the unoptimized code path. Also, ISTR that Steven's original timeit runs tacked on a standalone "eval ; ..."

Re: Calling a function is faster than not calling it?

2015-05-11 Thread BartC
On 11/05/2015 15:12, Skip Montanaro wrote: On Mon, May 11, 2015 at 4:50 AM, BartC mailto:b...@freeuk.com>> wrote: You just seem surprised that using eval() to do this is slower than a direct call. Well, it is surprising. Most uses of eval() are to evaluate Python expressions in string

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 9:03:43 AM UTC-5, Marko Rauhamaa wrote: > Antoon Pardon : > > > The point is that all too often someone wants to defend a specific > > choice the developers have made and cites some general rule or > > principle in support, ignoring the fact that python breaks that > > r

Re: anomaly

2015-05-11 Thread Terry Reedy
Further posts on this thread should delete pydev-list or gmane.comp.python.devel. It was a mistake by the troll to ever post this there. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-11 Thread Skip Montanaro
Steven> Python is in production use in hundreds of thousands of organisations. It Steven> has been heavily used for over twenty years, in everything from quick and Steven> dirty one line scripts to hundred-thousand LOC applications. Mark> Yeah, so was COBOL. Boom. Your point being? The software

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Grant Edwards
On 2015-05-11, Skip Montanaro wrote: > Don't CS departments still have a computer languages survey class? When I > was a graduate student at Iowa in the early 80s, we had one. (It was, as I > recall, an upper level undergrad course. I didn't get into CS until > graduate school, so went back to fi

Re: Feature Request: Reposition Execution

2015-05-11 Thread Grant Edwards
On 2015-05-11, Steven D'Aprano wrote: > On Mon, 11 May 2015 09:57 pm, Dave Angel wrote: > >> On 05/11/2015 07:46 AM, Skybuck Flying wrote: >>> Hello, >>> >>> Sometimes it can be handy to "interrupt/reset/reposition" a running >>> script. >>> >>> For example something externally goes badly wrong. >

Re: anomaly

2015-05-11 Thread zipher
On Monday, May 11, 2015 at 1:11:26 AM UTC-5, Steven D'Aprano wrote: > On Monday 11 May 2015 10:57, zipher wrote: > > I guess everyone expects this behavior since Python implemented this idea > > of "everything is an object", but I think this branch of OOP (on the > > branch of the Tree of Programm

Re: anomaly

2015-05-11 Thread Chris Angelico
On Mon, May 11, 2015 at 11:38 PM, Antoon Pardon wrote: > "We allow buitins to be overridden", doesn't sound as a very accurate > description of the underlining reason, when you know that things have > been removed from builtins and made a keyword in order to prevent them > from being overridden.

Re: Calling a function is faster than not calling it?

2015-05-11 Thread Skip Montanaro
On Mon, May 11, 2015 at 4:50 AM, BartC wrote: > You just seem surprised that using eval() to do this is slower than a > direct call. Well, it is surprising. Most uses of eval() are to evaluate Python expressions in string form. That I expect to be quite slow, given the parsing+byte compilation

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread Skip Montanaro
Don't CS departments still have a computer languages survey class? When I was a graduate student at Iowa in the early 80s, we had one. (It was, as I recall, an upper level undergrad course. I didn't get into CS until graduate school, so went back to filled in some missing stuff.) I don't recall all

Re: anomaly

2015-05-11 Thread Marko Rauhamaa
Antoon Pardon : > The point is that all too often someone wants to defend a specific > choice the developers have made and cites some general rule or > principle in support, ignoring the fact that python breaks that > rule/principle in other area's. Granted, but you have set the trap for them by

Re: anomaly

2015-05-11 Thread Mel Wilson
On Sun, 10 May 2015 14:12:44 -0500, boB Stepp wrote: > I have to admit being surprised by this, too. I am just now studying on > how to write my own classes in Python, and have come to realize that > doing this is *possible*, but the *surprise* to me is why the language > design allowed this to ac

Re: anomaly

2015-05-11 Thread Antoon Pardon
Op 11-05-15 om 14:34 schreef Steven D'Aprano: > On Mon, 11 May 2015 09:39 pm, Antoon Pardon wrote: > >> There is no >> a priori reason why we should turn "True" into a keyword and allow >> "int" in the builtins. > Why should there be an *a priori* reason? I don't say there should be an *a priori*

Re: anomaly

2015-05-11 Thread Antoon Pardon
Op 11-05-15 om 13:58 schreef Marko Rauhamaa: > Antoon Pardon : > >> Which is exactly the point! They were turned into keywords because the >> developers didn't want to allow them being overridden. There is no a >> priori reason why we should turn "True" into a keyword and allow "int" >> in the buil

Re: Feature Request: Reposition Execution

2015-05-11 Thread Dave Angel
On 05/11/2015 08:35 AM, Steven D'Aprano wrote: On Mon, 11 May 2015 09:57 pm, Dave Angel wrote: On 05/11/2015 07:46 AM, Skybuck Flying wrote: Hello, Sometimes it can be handy to "interrupt/reset/reposition" a running script. For example something externally goes badly wrong. os.kill() the

Re: why would this print 'True'?

2015-05-11 Thread Neal Becker
Nevermind - I found the answer. I was trying this in ipython with pylab: http://stackoverflow.com/questions/7491951/python-builtin-all-with-generators Neal Becker wrote: > from itertools import ifilter > > if all (hasattr (b, 'test') for b in ifilter (lambda b: b < 10, > [1,2,3,4])): > pri

Re: anomaly

2015-05-11 Thread boB Stepp
On Mon, May 11, 2015 at 2:40 AM, Mark Lawrence wrote: > On 10/05/2015 20:12, boB Stepp wrote: >> I'm surprised that this thought has not been added to the "Zen Of >> Python", as I see it as more and more recurrent as I continue my >> studies. What I would like to comprehend is what is the essenti

why would this print 'True'?

2015-05-11 Thread Neal Becker
from itertools import ifilter if all (hasattr (b, 'test') for b in ifilter (lambda b: b < 10, [1,2,3,4])): print 'True' same result using filter instead of ifilter. hasattr (b, 'test') where b is 1, 2, 3... should all be False. So why does this print True? -- Those who fail to understand

Re: anomaly

2015-05-11 Thread boB Stepp
On Mon, May 11, 2015 at 2:44 AM, Chris Angelico wrote: > On Mon, May 11, 2015 at 5:12 AM, boB Stepp wrote: >>> Common Python thought:: "We're all adults here."If you want to override >>> a builtin within your own namespace, who are we to stop you? >> >> I'm surprised that this thought has no

Re: Feature Request: Reposition Execution

2015-05-11 Thread Steven D'Aprano
On Mon, 11 May 2015 09:57 pm, Dave Angel wrote: > On 05/11/2015 07:46 AM, Skybuck Flying wrote: >> Hello, >> >> Sometimes it can be handy to "interrupt/reset/reposition" a running >> script. >> >> For example something externally goes badly wrong. >> > > os.kill() > > then in your process, handl

Re: anomaly

2015-05-11 Thread Steven D'Aprano
On Mon, 11 May 2015 09:39 pm, Antoon Pardon wrote: > There is no > a priori reason why we should turn "True" into a keyword and allow > "int" in the builtins. Why should there be an *a priori* reason? There's no a priori reason why I speak English, instead of communicating through the medium of

Re: Feature Request: Reposition Execution

2015-05-11 Thread Marko Rauhamaa
Dave Angel : > On 05/11/2015 07:46 AM, Skybuck Flying wrote: >> Hello, >> >> Sometimes it can be handy to "interrupt/reset/reposition" a running script. >> For example something externally goes badly wrong. > > os.kill() > > then in your process, handle the exception, and do whatever you think > i

Re: anomaly

2015-05-11 Thread BartC
On 11/05/2015 02:18, zipher wrote: Huh? Python has plenty of keywords, and indeed, none of them can be redefined or shadowed.But you would gain nothing (and lose a bit or dynamic-language freedom) by making int a keyword. Okay. I apologize for thinking in C and believing "int" was a keyw

Re: anomaly

2015-05-11 Thread Marko Rauhamaa
Antoon Pardon : > Which is exactly the point! They were turned into keywords because the > developers didn't want to allow them being overridden. There is no a > priori reason why we should turn "True" into a keyword and allow "int" > in the builtins. > > We are only allowed to be adults, for as f

ANN: eGenix PyRun - One file Python Runtime 2.1.0

2015-05-11 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix PyRun - One file Python Runtime Version 2.1.0 An easy-to-use single file relocatable Python run-time - available for Linux, Mac OS X and U

Re: Feature Request: Reposition Execution

2015-05-11 Thread Dave Angel
On 05/11/2015 07:46 AM, Skybuck Flying wrote: Hello, Sometimes it can be handy to "interrupt/reset/reposition" a running script. For example something externally goes badly wrong. os.kill() then in your process, handle the exception, and do whatever you think is worthwhile. -- DaveA -

Feature Request: Reposition Execution

2015-05-11 Thread Skybuck Flying
Hello, Sometimes it can be handy to "interrupt/reset/reposition" a running script. For example something externally goes badly wrong. The script is unaware of this. Current solution would require to have an "Abort" boolean everywhere. The abort boolean could then be set to True to indicate al

Re: anomaly

2015-05-11 Thread Mark Lawrence
On 11/05/2015 12:39, Antoon Pardon wrote: Op 11-05-15 om 12:40 schreef Mark Lawrence: On 11/05/2015 11:15, Antoon Pardon wrote: Op 10-05-15 om 19:28 schreef Gary Herron: Common Python thought:: "We're all adults here."If you want to override a builtin within your own namespace, who are w

Re: anomaly

2015-05-11 Thread Antoon Pardon
Op 11-05-15 om 12:40 schreef Mark Lawrence: > On 11/05/2015 11:15, Antoon Pardon wrote: >> Op 10-05-15 om 19:28 schreef Gary Herron: >> >>> Common Python thought:: "We're all adults here."If you want to >>> override a builtin within your own namespace, who are we to stop you? >>> Besides, it's

Re: anomaly

2015-05-11 Thread Mark Lawrence
On 11/05/2015 11:15, Antoon Pardon wrote: Op 10-05-15 om 19:28 schreef Gary Herron: Common Python thought:: "We're all adults here."If you want to override a builtin within your own namespace, who are we to stop you? Besides, it's still available as __builtins__.int (unless you've also ov

Re: anomaly

2015-05-11 Thread Antoon Pardon
Op 10-05-15 om 19:28 schreef Gary Herron: > Common Python thought:: "We're all adults here."If you want to > override a builtin within your own namespace, who are we to stop you? > Besides, it's still available as __builtins__.int (unless you've also > overridden that). This is a common p

Re: Calling a function is faster than not calling it?

2015-05-11 Thread BartC
On 11/05/2015 04:58, Steven D'Aprano wrote: On Mon, 11 May 2015 07:08 am, BartC wrote: On 10/05/2015 10:58, Steven D'Aprano wrote: def func(): a = 2 b = 3 c = 4 return (a+b)*(a-b)/(a*c + b*c) print (min(t1.repeat(repeat=10))) print (min(t2.repeat(repeat=10))) May

Re: [Python-Dev] anomaly

2015-05-11 Thread Paul Moore
On 10 May 2015 at 17:34, Mark Rosenblitt-Janssen wrote: > Here's something that might be wrong in Python (tried on v2.7): > class int(str): pass > int(3) > '3' It's not wrong as such. It is allowed to define your own class that subclasses a builtin class, and it's allowed to shadow buil

Re: anomaly

2015-05-11 Thread Chris Angelico
On Mon, May 11, 2015 at 5:12 AM, boB Stepp wrote: >> Common Python thought:: "We're all adults here."If you want to override >> a builtin within your own namespace, who are we to stop you? > > I'm surprised that this thought has not been added to the "Zen Of > Python", as I see it as more and

Re: anomaly

2015-05-11 Thread Mark Lawrence
On 10/05/2015 20:12, boB Stepp wrote: On Sun, May 10, 2015 at 12:28 PM, Gary Herron wrote: Common Python thought:: "We're all adults here."If you want to override a builtin within your own namespace, who are we to stop you? I'm surprised that this thought has not been added to the "Zen

Re: Delivery Status Notification (Failure)

2015-05-11 Thread Tim Delaney
On 9 May 2015 at 13:56, Chris Angelico wrote: > > Yeah, I know, shocking. But I wanted to at least *try* doing the > normal and official thing, in the hopes that they were a legit company > that perhaps didn't realize what this looked like. > By all means report to abuse@ in the future, but plea

Re: anomaly

2015-05-11 Thread boB Stepp
I am in process learning Python and normally hang out on the Tutor list, but monitor this one hoping to learn what I can. This thread is of interest to me from the standpoint of trying to understand the Python way of doing things. On Sun, May 10, 2015 at 12:28 PM, Gary Herron wrote: > On 05/10/20

Re: anomaly

2015-05-11 Thread lorenzo . gatti
On Monday, May 11, 2015 at 2:58:09 AM UTC+2, zipher wrote: > I guess everyone expects this behavior since Python implemented this idea of > "everything is an object", but I think this branch of OOP (on the branch of > the Tree of Programming Languages) has to be chopped off. The idea of > every

Re: Why is array.array('u') deprecated?

2015-05-11 Thread Mark Lawrence
On 08/05/2015 15:40, jonathan.slend...@gmail.com wrote: Le vendredi 8 mai 2015 15:11:56 UTC+2, Peter Otten a écrit : So, this works perfectly fine and fast. But it scares me that it's deprecated and Python 4 will not support it anymore. Hm, this doesn't even work with Python 3: My mistake. I