Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread ALAN GAULD
> My friend clarifies: "It's not the efficiency of doxygen that's the > question. The problem is that you can add fields to objects as you go in > Python so you need to do a deep analysis of the code to determine the class > structure which you don't have to do with C++ (or Java)." That's true

Re: [Tutor] Simple way to compare Two lists

2007-08-17 Thread Alan Gauld
"jim stockford" <[EMAIL PROTECTED]> wrote > Why is a dict lookup constant time. I.e. if there's a > loop that walks a (shorter) list and compares each > element with each element of a dict, what's going > on to make this faster than an outer loop walking > a list and an inner loop walking a secon

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Alan Gauld
"Stephen McInerney" <[EMAIL PROTECTED]> wrote > Yes but it's still a canonical question about analysis of > weakly-typed > dynamic languages, since my Java friend makes separate comments > about scalability when analyzing large builds - he claims 1-5m lines > of > code is a threshold. There is

Re: [Tutor] Opening Multiple Files

2007-08-17 Thread Luke Paireepinart
Paulo Quaglio wrote: > Hi everyone, > Thanks for all suggestions. Let me just preface this by saying that > I’m new to both python and programming. I started learning 3 months > ago with online tutorials and reading the questions you guys post. So, > thank you all very, very much…and I apologize

Re: [Tutor] Opening Multiple Files

2007-08-17 Thread Alan Gauld
"Paulo Quaglio" <[EMAIL PROTECTED]> wrote > I've solved the problem of opening several files to process "as a > batch" > with glob.glob(). Only now did I realize that the program and files > need to be in the same folder.. They don't but you do need to pass a valid path to open() Thus if your c

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Stephen McInerney
Hi Alan, > > My friend clarifies: "It's not the efficiency of doxygen that's the > > question. The problem is that you can add fields to objects as you go in > > Python so you need to do a deep analysis of the code to determine the >class > > structure which you don't have to do with C++ (or Java

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Duncan Gibson
> Is this not just evidence of a very bad Python coding style? > Should we not always declare *all* class fields in the class definition > by assigning to them, even if the assignment is token or dummy > i.e. 'None', "", [], {} etc. this is one of the many things that pylint can warn you about. I

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Kent Johnson
Stephen McInerney wrote: > Hi Alan, > >>> My friend clarifies: "It's not the efficiency of doxygen that's the >>> question. The problem is that you can add fields to objects as you go in >>> Python so you need to do a deep analysis of the code to determine the >> class >>> structure which you don

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-17 Thread Chris Calloway
bhaaluu wrote: > Perhaps these concerns should be directed to either the > maintainers of Python.Org ( http://python.org/ ), or to > the author of the Software Carpentry Course? I sent a pointer both to the lead maintainer (Dr. Greg Wilson at Univ. Toronto) and to Titus Brown who, along with Chri

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Eric Brunson
Stephen McInerney wrote: > Hi Alan, > > >>> My friend clarifies: "It's not the efficiency of doxygen that's the >>> question. The problem is that you can add fields to objects as you go in >>> Python so you need to do a deep analysis of the code to determine the >>> >> class >> >>>

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Alan Gauld
"Stephen McInerney" <[EMAIL PROTECTED]> wrote >>lines to parse in a Python project, typically only a third or a >>quarter of >>the number of lines - sometimes less than that. > > Can you cite us a literature source for saying that Python is 3-4x > more > expressive per line-of-code than C++? I

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Stephen McInerney
Eric, you misunderstood my point. I said you make a **token** assignment in the class defn simply to do two things: - 1) identify all the members in one place - 2) annotate each member's type, as much as you can e.g.: class C s = [] d = {} ot = (None, None) I didn't say you make the actual assign

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Alan Gauld
"Stephen McInerney" <[EMAIL PROTECTED]> wrote > Eric, you misunderstood my point. > I said you make a **token** assignment in the class defn simply > to do two things: > - 1) identify all the members in one place > - 2) annotate each member's type, as much as you can I'm sure Eric can explain for

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-17 Thread wesley chun
> > up to the object's > > mutability on whether assignment to that object is possible. > > As long as I'm nitpicking...well, I guess I don't know what you mean by > assignment to an object. Assignment is to names, not objects. There is > nothing you can do in a function to bind a new object to a n

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Eric Brunson
We're definitely on the same wavelength, Alan. :-) Alan Gauld wrote: > "Stephen McInerney" <[EMAIL PROTECTED]> wrote > > >> Eric, you misunderstood my point. >> I said you make a **token** assignment in the class defn simply >> to do two things: >> - 1) identify all the members in one place >

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Stephen McInerney
Oh ok, I see. Yes I've also programmed classes that dynamically declare themselves (mine was for XML parsing). Presumably static analyzers like Doxygen etc. can't handle those so they lie outside the scope of what we were discussing. I was asking if it's a recognized good programming practice to

Re: [Tutor] Efficiency of Doxygen on Python vs C++?

2007-08-17 Thread Kent Johnson
Stephen McInerney wrote: > I was asking if it's a recognized good programming practice to > declare and initialize *all* members in the class defn. What do you mean by "initialize *all* members in the class defn"? Your original example was not syntactically correct Python. You wrote: class C s

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-17 Thread Dick Moores
At 08:19 AM 8/17/2007, Chris Calloway wrote: >bhaaluu wrote: > > Perhaps these concerns should be directed to either the > > maintainers of Python.Org ( http://python.org/ ), or to > > the author of the Software Carpentry Course? > >I sent a pointer both to the lead maintainer (Dr. Greg Wilson at U

[Tutor] What is a "symbolic debugger"

2007-08-17 Thread Dick Moores
In the "Python Book Recommendations [Was:[Re: Security]]" thread, Chris Calloway included a link to the American Scientist article, "Where's the Real Bottleneck in Scientific Computing?". In that article I saw a term, "symbolic debugger", I had been wondering about for a while. Google was of l