Re: Sudden doubling of nearly all messages

2012-07-21 Thread Dieter Maurer
Dave Angel writes: > Has anybody else noticed the sudden double-posting of nearly all > messages in the python mailing list? I am reading this list via "gmane" and do not see any double postings. -- http://mail.python.org/mailman/listinfo/python-list

Re: A thread import problem

2012-07-21 Thread Dieter Maurer
Bruce Sherwood writes: > ... > The failure of this test case suggests that one cannot do imports > inside secondary threads started in imported modules, something I keep > tripping over. But I hope you'll be able to tell me that I'm doing > something wrong! As you know multiple threads can be dan

Re: A thread import problem

2012-07-21 Thread Dieter Maurer
Bruce Sherwood writes: > Thanks much for this suggestion. I'm not sure I've correctly > understood the operation "start_new_thread(lambda: __import__( module>), ())". By "your module" do you mean the user program which > imported the module that will execute start_new_thread? By "your_module", I

Re: My first ever Python program, comments welcome

2012-07-21 Thread rusi
On Jul 22, 1:10 am, Dave Angel wrote: > A totally off-the-wall query.  Are you using a source control system, > such as git ?  It can make you much braver about refactoring a working > program. Question in a similar vein: What development environment do you use? My impression is that the majorit

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
Alex Strickland wrote: Hi Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kudos welcome! ;) "No

Re: My first ever Python program, comments welcome

2012-07-21 Thread Dave Angel
On 07/21/2012 09:56 PM, MRAB wrote: > On 22/07/2012 01:32, Steven D'Aprano wrote: >> On Sat, 21 Jul 2012 20:40:46 +0100, MRAB wrote: >> >>> On 21/07/2012 20:08, Lipska the Kat wrote: l=sorted(l, key=itemgetter(0)) >>> >>> Short is: >>> >>> l.sort(key=itemgetter(0)) >> >> Shorter, and

Re: My first ever Python program, comments welcome

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 11:56 AM, MRAB wrote: > Since the result is bound to the original name, the > result is the same. Yes, assuming there are no other refs. >>> a=[3,2,1] >>> b=a >>> a=sorted(a) >>> a [1, 2, 3] >>> b [3, 2, 1] ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: My first ever Python program, comments welcome

2012-07-21 Thread MRAB
On 22/07/2012 01:32, Steven D'Aprano wrote: On Sat, 21 Jul 2012 20:40:46 +0100, MRAB wrote: On 21/07/2012 20:08, Lipska the Kat wrote: l=sorted(l, key=itemgetter(0)) Short is: l.sort(key=itemgetter(0)) Shorter, and the semantics are subtly different. The sorted function retu

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 11:33 AM, Rick Johnson wrote: > On Saturday, July 21, 2012 6:16:24 PM UTC-5, Chris Angelico wrote: > >> Just to clarify, I'm not advocating the > [...snip...] > > Well. Well. Backpedaling AND brown-nosing in a single post. Nice! Absolutely. Haven't you noticed that I'm one

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Rick Johnson
On Saturday, July 21, 2012 6:16:24 PM UTC-5, Chris Angelico wrote: > Just to clarify, I'm not advocating the [...snip...] Well. Well. Backpedaling AND brown-nosing in a single post. Nice! -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Devin Jeanpierre
On Sat, Jul 21, 2012 at 5:06 AM, Steven D'Aprano wrote: > So there is approximately 0.03 second difference per TWO MILLION > if...else blocks, or about 15 nanoseconds each. This is highly unlikely > to be the bottleneck in your code. Assuming the difference is real, and > not just measurement erro

Re: My first ever Python program, comments welcome

2012-07-21 Thread Steven D'Aprano
On Sat, 21 Jul 2012 16:10:51 -0400, Dave Angel wrote: >> with fileinput.input(files=(filename)) as f: > > fileinput is much more general than you want for processing a single > file. That may be deliberate, if you're picturing somebody using > wildcards on their input. But if so, you should pro

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 10:20 AM, Steven D'Aprano wrote: > On Sun, 22 Jul 2012 04:25:21 +1000, Chris Angelico wrote: > >> Use whichever service you like, but don't seriously expect anything that >> you don't pay money for to be perfectly featured AND not spy on you. > > http://duckduckgo.com/priva

Re: My first ever Python program, comments welcome

2012-07-21 Thread Steven D'Aprano
On Sat, 21 Jul 2012 20:40:46 +0100, MRAB wrote: > On 21/07/2012 20:08, Lipska the Kat wrote: >> l=sorted(l, key=itemgetter(0)) > > Short is: > > l.sort(key=itemgetter(0)) Shorter, and the semantics are subtly different. The sorted function returns a copy of the input list. The list.s

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Dave Angel
On 07/21/2012 08:13 PM, Steven D'Aprano wrote: > On Sat, 21 Jul 2012 06:48:29 -0400, Dave Angel wrote: > >> Has anybody else noticed the sudden double-posting of nearly all >> messages in the python mailing list? > No I have not. > > It sounds like a problem with your Usenet provider. Remember that

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Steven D'Aprano
On Sat, 21 Jul 2012 19:07:28 -0400, Devin Jeanpierre wrote: > People hold grudges against MS too strongly, and they believe too much > in Google's righteousness. They are both big companies that don't > necessarily care about you. +1 Google's motto "Don't be evil" should really be, "Don't b

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Steven D'Aprano
On Sat, 21 Jul 2012 06:48:29 -0400, Dave Angel wrote: > Has anybody else noticed the sudden double-posting of nearly all > messages in the python mailing list? No I have not. It sounds like a problem with your Usenet provider. Remember that this news group is a mirror of the mailing list python

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 9:07 AM, Devin Jeanpierre wrote: > People hold grudges against MS too strongly, and they believe too much > in Google's righteousness. They are both big companies that don't > necessarily care about you. Just to clarify, I'm not advocating the "Google is perfect" stance ei

Re: A thread import problem

2012-07-21 Thread Bruce Sherwood
On Sat, Jul 21, 2012 at 4:16 PM, Dennis Lee Bieber wrote: > On Sat, 21 Jul 2012 10:11:30 -0600, Bruce Sherwood > declaimed the following in > gmane.comp.python.general: > > >> >> --- >> testABA.py -- execute this file >> >> from ABA import * >> print('exec testABA') >> fro

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Devin Jeanpierre
On Sat, Jul 21, 2012 at 2:25 PM, Chris Angelico wrote: > On Sun, Jul 22, 2012 at 4:16 AM, Rick Johnson > wrote: >> It was a nice run Google. We had good times and bad times. A few smiles and >> cries. >> >> LMBTFY > > So, what... you reckon Microsoft is going to be the paragon of > righteousness

Re: A thread import problem

2012-07-21 Thread Dave Angel
On 07/21/2012 05:35 PM, Bruce Sherwood wrote: > On Sat, Jul 21, 2012 at 2:53 PM, Dave Angel wrote: >> >> For docs on the threading thing, see: >> >> http://docs.python.org/library/threading.html >> >> " ... an import should not have the side effect of spawning a new thread >> and then waiting for

Re: ANN: dbf.py 0.94

2012-07-21 Thread Mark Lawrence
On 21/07/2012 21:57, Alex Strickland wrote: Hi Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kud

Re: A thread import problem

2012-07-21 Thread Bruce Sherwood
On Sat, Jul 21, 2012 at 2:53 PM, Dave Angel wrote: > On 07/21/2012 04:36 PM, Bruce Sherwood wrote: >> Thanks much for this clear statement. I hadn't managed to find any >> documentation on this specific issue. >> >> Bruce Sherwood >> >> On Sat, Jul 21, 2012 at 10:26 AM, Dave Angel wrote: >>> Two

Re: Encapsulation, inheritance and polymorphism

2012-07-21 Thread Erik Max Francis
On 07/20/2012 03:28 AM, BartC wrote: "Erik Max Francis" wrote in message news:gskdnwoqpkoovztnnz2dnuvz5s2dn...@giganews.com... On 07/20/2012 01:11 AM, Steven D'Aprano wrote: On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote: I'm reminded of Graham's Number, which is so large that there ar

Re: Encapsulation, inheritance and polymorphism

2012-07-21 Thread Erik Max Francis
On 07/20/2012 02:05 AM, Virgil Stokes wrote: On 20-Jul-2012 10:27, Steven D'Aprano wrote: The fellow looked relived and said "Oh thank god, I thought you said *million*!" How does this relate to the python list? It's also a seriously old joke. -- Erik Max Francis && m...@alcyone.com && http

Re: ANN: dbf.py 0.94

2012-07-21 Thread Alex Strickland
Hi Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kudos welcome! ;) "Not supported: index files

Re: A thread import problem

2012-07-21 Thread Dave Angel
On 07/21/2012 04:36 PM, Bruce Sherwood wrote: > Thanks much for this clear statement. I hadn't managed to find any > documentation on this specific issue. > > Bruce Sherwood > > On Sat, Jul 21, 2012 at 10:26 AM, Dave Angel wrote: >> Two of the things you mustn't do during an import: >> >> 1) start

Re: A thread import problem

2012-07-21 Thread Bruce Sherwood
Thanks much for this clear statement. I hadn't managed to find any documentation on this specific issue. Bruce Sherwood On Sat, Jul 21, 2012 at 10:26 AM, Dave Angel wrote: > Two of the things you mustn't do during an import: > > 1) start or end any threads > 2) import something that's already in

Re: My first ever Python program, comments welcome

2012-07-21 Thread Dave Angel
On 07/21/2012 03:08 PM, Lipska the Kat wrote: > Greetings Pythoners > > A short while back I posted a message that described a task I had set > myself. I wanted to implement the following bash shell script in Python > You already have comments from Ian and MRAB, and I'll try to point out only thin

Re: My first ever Python program, comments welcome

2012-07-21 Thread MRAB
On 21/07/2012 20:08, Lipska the Kat wrote: Greetings Pythoners A short while back I posted a message that described a task I had set myself. I wanted to implement the following bash shell script in Python Here's the script sort -nr $1 | head -${2:-10} this script takes a filename and an optio

Re: My first ever Python program, comments welcome

2012-07-21 Thread Ian Foote
On 21/07/12 20:08, Lipska the Kat wrote: Greetings Pythoners A short while back I posted a message that described a task I had set myself. I wanted to implement the following bash shell script in Python Here's the script sort -nr $1 | head -${2:-10} this script takes a filename and an optio

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Thomas 'PointedEars' Lahn
Jan Riechers wrote: > I have one very basic question about speed,memory friendly coding, and > coding style of the following easy "if"-statement in Python 2.7, but Im > sure its also the same in Python 3.x > > Block > #-- > if statemente_true: > doSomething() > els

My first ever Python program, comments welcome

2012-07-21 Thread Lipska the Kat
Greetings Pythoners A short while back I posted a message that described a task I had set myself. I wanted to implement the following bash shell script in Python Here's the script sort -nr $1 | head -${2:-10} this script takes a filename and an optional number of lines to display and sorts t

Re: ANN: dbf.py 0.94

2012-07-21 Thread Matej Cepl
On 21/07/12 05:26, Ethan Furman wrote: dbf (also known as python dbase) is a module for reading/writing dBase III, FP, VFP, and soon Clipper, .dbf database files. It's an ancient format that still finds lots of use. Other than the caring for the ancient legacy data, it is still widely used in

Re: ANN: dbf.py 0.94

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 4:15 AM, Ethan Furman wrote: > I'll support 3.3+, but not with the same code base: I want to use all the > cool features that 3.3 has! :) The trouble with double-codebasing is that you have double maintenance. But sure. So long as your time isn't under great pressure, it

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Chris Angelico
On Sun, Jul 22, 2012 at 4:16 AM, Rick Johnson wrote: > It was a nice run Google. We had good times and bad times. A few smiles and > cries. > > LMBTFY So, what... you reckon Microsoft is going to be the paragon of righteousness against the squalor of Google's information-grubbing tactics? Fascin

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
Chris Angelico wrote: On Sat, Jul 21, 2012 at 6:02 PM, Ethan Furman wrote: Works with CPython 2.4 - 2.7. (Tested) Have you considered supporting 3.2/3.3 at all? It's often not difficult to make your code compatible with both. Or is there some dependency that is locked to 2.X? I'll support 3

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Rick Johnson
On Saturday, July 21, 2012 5:48:29 AM UTC-5, Dave Angel wrote: > Has anybody else noticed the sudden double-posting of nearly all > messages in the python mailing list? > > Previously, I've seen some messages double posted, and it was nearly > always a newbie, presumably posting via some low-end g

Sudden doubling of nearly all messages

2012-07-21 Thread Sergi Pasoev
> I'm using Thunderbird 14.0 on Linux 11.04, with mail configured for > non-digest mode. I read the messages in threaded mode. I wonder how many decades should pass for linux to reach its 11.04 version. OK, I know you mean Ubuntu. There is already a lot of wrong use of names connected to Gnu, Li

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Dave Angel
On 07/21/2012 06:48 AM, Dave Angel wrote: > Has anybody else noticed the sudden double-posting of nearly all > messages in the python mailing list? > > Previously, I've seen some messages double posted, and it was nearly > always a newbie, presumably posting via some low-end gateway. But now > i'm

Re: can someone teach me this?

2012-07-21 Thread hamilton
On 7/21/2012 9:06 AM, Devin Jeanpierre wrote: On Fri, Jul 20, 2012 at 11:15 PM, hamilton wrote: You are an idiot, or a scammer. Please be nice. -- Devin Devin, When someone asks me to download a compressed file, its just like the SCAM junk email I get all too often. If the OP would lea

Re: Calling Java jar class with parameter from Python

2012-07-21 Thread jasonveldicott
On Saturday, July 21, 2012 6:57:48 AM UTC-7, Roy Smith wrote: > In article , > Peter Otten <__pete...@web.de> wrote: > > > subprocess.Popen([ > > "C:\\Program Files (x86)\\Java\\jdk1.7.0_05\\bin\\java.exe", > > "-cp", > > "C:\\antlr\\antl

Re: A thread import problem

2012-07-21 Thread Dave Angel
On 07/21/2012 10:54 AM, Bruce Sherwood wrote: > Thanks much for this suggestion. I'm not sure I've correctly > understood the operation "start_new_thread(lambda: __import__( module>), ())". By "your module" do you mean the user program which > imported the module that will execute start_new_thread?

Re: Newbie question on python programming

2012-07-21 Thread Tom P
On 07/21/2012 02:30 AM, Ian Kelly wrote: On Fri, Jul 20, 2012 at 5:38 PM, Chris Williams wrote: Hello I hope this is the right newsgroup for this post. I am just starting to learn python programming and it seems very straightforward so far. It seems, however, geared toward doing the sort of p

Re: A thread import problem

2012-07-21 Thread Bruce Sherwood
I couldn't get a simple test case to work. I append a listing of the little test files, all in the same folder. The diagnostic statement print('after start_new_thread\n') works, but then nothing. Originally I tried importing testABA.py but was worried that the circular importing (A imports B which

Re: Calling Java jar class with parameter from Python

2012-07-21 Thread jasonveldicott
On Saturday, July 21, 2012 5:20:48 AM UTC-7, Peter Otten wrote: > Jason Veldicott wrote: > > > subprocess.Popen(["C:\\Program Files > > (x86)\\Java\\jdk1.7.0_05\\bin\\java.exe", "-cp > > c:\\antlr\\antlr-3.4-complete.jar org.antlr.Tool", > > "C:\\Users\\Jason\\Documents\\antlr\\java grammar\\Java.

Re: can someone teach me this?

2012-07-21 Thread Devin Jeanpierre
On Fri, Jul 20, 2012 at 11:15 PM, hamilton wrote: > You are an idiot, or a scammer. Please be nice. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: A thread import problem

2012-07-21 Thread Bruce Sherwood
Thanks much for this suggestion. I'm not sure I've correctly understood the operation "start_new_thread(lambda: __import__(), ())". By "your module" do you mean the user program which imported the module that will execute start_new_thread? It hadn't occurred to me to have A import B and B import A,

Re: Calling Java jar class with parameter from Python

2012-07-21 Thread Roy Smith
In article , Peter Otten <__pete...@web.de> wrote: > subprocess.Popen([ > "C:\\Program Files (x86)\\Java\\jdk1.7.0_05\\bin\\java.exe", > "-cp", > "C:\\antlr\\antlr-3.4-complete.jar", > "org.antlr.Tool", > "C:\\Users\\Jason\\Documents\\antlr\\java grammar\\Java.g"], >stdout=subproces

Re: Calling Java jar class with parameter from Python

2012-07-21 Thread Peter Otten
Jason Veldicott wrote: > subprocess.Popen(["C:\\Program Files > (x86)\\Java\\jdk1.7.0_05\\bin\\java.exe", "-cp > c:\\antlr\\antlr-3.4-complete.jar org.antlr.Tool", > "C:\\Users\\Jason\\Documents\\antlr\\java grammar\\Java.g"], > stdout=subprocess.PIPE, shell=True ).communicate() > > > Obviously,

Calling Java jar class with parameter from Python

2012-07-21 Thread Jason Veldicott
Hi, I have read a number of posts on how this can be done, but I have not been able to replicate success with the particular command I'm wishing to execute. I am wanting to execute the following Java command from Python in Windows: java -cp c:\antlr\antlr-3.4-complete.jar org.antlr.Tool "C:\User

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Colin J. Williams
On 21/07/2012 6:48 AM, Dave Angel wrote: Has anybody else noticed the sudden double-posting of nearly all messages in the python mailing list? No. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Dave Angel
On 07/21/2012 07:05 AM, Andrew Berg wrote: > On 7/21/2012 5:48 AM, Dave Angel wrote: >> Has anybody else noticed the sudden double-posting of nearly all >> messages in the python mailing list? > I am also using the mailing list, but I haven't experienced this. Well, my own message was doubled, but

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Mark Lawrence
On 21/07/2012 11:48, Dave Angel wrote: Has anybody else noticed the sudden double-posting of nearly all messages in the python mailing list? No. Previously, I've seen some messages double posted, and it was nearly always a newbie, presumably posting via some low-end gateway. But now i'm not

Re: Sudden doubling of nearly all messages

2012-07-21 Thread Andrew Berg
On 7/21/2012 5:48 AM, Dave Angel wrote: > Has anybody else noticed the sudden double-posting of nearly all > messages in the python mailing list? I am also using the mailing list, but I haven't experienced this. -- CPython 3.3.0b1 | Windows NT 6.1.7601.17803 -- http://mail.python.org/mailman/list

Sudden doubling of nearly all messages

2012-07-21 Thread Dave Angel
Has anybody else noticed the sudden double-posting of nearly all messages in the python mailing list? Previously, I've seen some messages double posted, and it was nearly always a newbie, presumably posting via some low-end gateway. But now i'm noticing nearly every message appears twice, identic

Re: PyPy, is it a 1:1 replacement for CPython?

2012-07-21 Thread Terry Reedy
On 7/20/2012 11:52 PM, Alec Taylor wrote: ask on PyPy's list But yes, it is designed as a 1:1 replacement of CPython It is a replacement for some late 2.x versions but not, at present, for Python 3. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
On 21.07.2012 12:06, Steven D'Aprano wrote: But in general, you're worrying too much about trivia. One way or the other, any speed difference will be trivial. Write whatever style reads and writes most naturally, and only worry about what's faster where it actually counts. Notice that I try

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Steven D'Aprano
On Sat, 21 Jul 2012 10:33:27 +0300, Jan Riechers wrote: > Hello Pythonlist, > > I have one very basic question about speed,memory friendly coding, and > coding style of the following easy "if"-statement in Python 2.7, but Im > sure its also the same in Python 3.x I assume that the following is m

Re: ANN: dbf.py 0.94

2012-07-21 Thread Chris Angelico
On Sat, Jul 21, 2012 at 6:02 PM, Ethan Furman wrote: > Works with CPython 2.4 - 2.7. (Tested) Have you considered supporting 3.2/3.3 at all? It's often not difficult to make your code compatible with both. Or is there some dependency that is locked to 2.X? ChrisA -- http://mail.python.org/mailm

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Andrew Berg
On 7/21/2012 3:13 AM, Jan Riechers wrote: > Cause, as I understand the interpreter chooses either the "else" (1st > block) or just proceeds with following code outside the if. If none of the if/elif statements evaluate to something true, the else block is executed. > So if there is some overhead

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Chris Angelico
On Sat, Jul 21, 2012 at 5:33 PM, Jan Riechers wrote: > Block > #-- > if statemente_true: > doSomething() > else: > doSomethingElseInstead() > > #-- This means, to me, that the two options are peers - you do this or yo

Re: A thread import problem

2012-07-21 Thread Dieter Maurer
Bruce Sherwood writes: > ... > from visual import box, rate > b = box() > while True: > rate(100) # no more than 100 iterations per second > b.pos.x += .01 > > This works because a GUI environment is invoked by the visual module > in a secondary thread (written mainly in C++, connected to

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
On 21.07.2012 11:02, Andrew Berg wrote: On 7/21/2012 2:33 AM, Jan Riechers wrote: Block ... versus this block: ... Now, very briefly, what is the better way to proceed in terms of execution speed, readability, coding style? Using if/else is the most readable in the general sense. Using return (

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
Simon Cropper wrote: Question 1 - What version of VFP will dbf work with? Is VFP9 OK? As long as you don't use auto-incrementing fields nor varchar fields you'll be fine. Question 2 - You statement of compatibility is unclear. Works with CPython 2.4 - 2.7. (Tested) Works with PyPy 1.8.

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
Steven D'Aprano wrote: This mailing list is about helping our fellow Python developers improve their skills and solve problems. That doesn't just mean *coding* problems, it also means helping them to write better documentation and promote their software better. Indeed it is, and your reminder

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Andrew Berg
On 7/21/2012 2:33 AM, Jan Riechers wrote: > Block > ... > versus this block: > ... > Now, very briefly, what is the better way to proceed in terms of > execution speed, readability, coding style? Using if/else is the most readable in the general sense. Using return (or break or continue as applica

Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
Hello Pythonlist, I have one very basic question about speed,memory friendly coding, and coding style of the following easy "if"-statement in Python 2.7, but Im sure its also the same in Python 3.x Block #-- if statemente_true: doSomething() else: