Re: if, continuation and indentation

2010-05-27 Thread Harald Luessen
On Thu, 27 May 2010 HH wrote: >I have a question about best practices when it comes to line wrapping/ >continuation and indentation, specifically in the case of an if >statement. > >if (width == 0 and >height == 0 and >color == 'red' and >emphasis == 'strong' or >

Re: Annoying octal notation

2009-08-24 Thread Harald Luessen
On Mon, 24 Aug 2009 Derek Martin wrote: >Those participating in this thread have pretty much all seem to agree >that the only places where decimal numbers with leading zeros really >are common are either in rather specialized applications, such as >computer-oriented data or serial numbers (which ty

Re: IDLE file saving problem

2009-08-23 Thread Harald Luessen
On Fri, 21 Aug 2009 14:48:56 -0700 (PDT), r wrote: >On Aug 21, 4:10 pm, MRAB wrote: > >Yes, and much more needs improvement! I have made many changes already >and i am polishing an "IDLE 3000" for the good people of Pythonia, >stay tuned more to come There is a small little detail that nags

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-06 Thread Harald Luessen
On Sun, 05 Oct 2008 "Aaron \"Castironpi\" Brady" wrote: >There's the possibility that the most important words should go first in >this case: > >result_flag__t > >But, I'll admit that other people could have learned different orders of >scanning words than I, especially depending on their spoken

Re: improving a huge double-for cycle

2008-09-19 Thread Harald Luessen
On Thu, 18 Sep 2008 Bruno Desthuilliers wrote: ># Harald : uncomment this and run test_results. As far as I can tell, it ># doesn't yields the expected results > >## IN7 = IN[:] >## def sortk7(n): >## return n.coordinates[0] > >## def doubles7(): >## "is ordering better ? - Nope Sir, it's

Re: improving a huge double-for cycle

2008-09-18 Thread Harald Luessen
On Thu, 18 Sep 2008 Alexzive wrote: >I am a python newbie and need to run following code for a task in an >external simulation programm called "Abaqus" which makes use of python >to access the mesh (ensamble of nodes with xy coordinates) of a >certain geometrical model. > >[IN is the starting inpu

Re: error when porting C code to Python (bitwise manipulation)

2008-07-10 Thread Harald Luessen
On Thu, 10 Jul 2008 Jordan wrote: >On Jul 10, 1:35 pm, MRAB <[EMAIL PROTECTED]> wrote: >> On Jul 10, 4:56 am, Jordan <[EMAIL PROTECTED]> wrote: >> >> >> >> > I am trying to rewrite some C source code for a poker hand evaluator >> > in Python.  Putting aside all of the comments such as just using t

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Harald Luessen
On Mon, 25 Jun 2007 Martin v. Löwis wrote: >Sure, see below: > >- tuples are represented as arrays, with a single block for the > entire objects (object header, tuple size, and data) >- list are represented as arrays, with two memory blocks: > one for object header and sizes, and the other one f

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Harald Luessen
On Mon, 25 Jun 2007 James Stroud wrote: >Harald Luessen wrote: >> Hi, I am new to python and I miss some understanding of the internals >> of some types and containers. With my C/C++ background I hope to get >> some hints to chose the best data structure for my progra

Internals and complexity of types, containers and algorithms

2007-06-25 Thread Harald Luessen
Hi, I am new to python and I miss some understanding of the internals of some types and containers. With my C/C++ background I hope to get some hints to chose the best data structure for my programs. Here are some questions: - Is there a brief description (not source) how the types tuple, stri