Re: Python too slow?

2008-01-16 Thread Ed Jensen
[EMAIL PROTECTED] wrote: > A lecturer gave me the perfect answer to the question of speed. > > "You have two choices when it comes to programming. Fast code, or fast > coders." "You're either with us, or against us." George W. Bush My understanding is that while CPython performance won't

Re: Python too slow?

2008-01-11 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > I don't think you're going to make you some friends here insulting > Fredrik. I don't know who Ed Jensen is, but we are quite a lot here to > know and respect Mr Lundh for his contributions to Python as both a >

Re: Python too slow?

2008-01-11 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > fact 1: CPython compiles source code to byte-code. > fact 2: CPython executes this byte-code. > fact 3: Sun's JDK compiles source code to byte-code. > fact 4: Sun's JDK executes this byte-code. > > Care to prove me wrong on any of these points ? Don

Re: Python too slow?

2008-01-10 Thread Ed Jensen
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > oh, please. it was perfectly clear for anyone with the slightest clue > what Bruno was talking about (especially if they'd read the post he was > replying to), so the only question that remains is why you didn't > understand it. If you have something

Re: Python too slow?

2008-01-10 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > I fail to see how the existence of JIT compilers in some Java VM changes > anything to the fact that both Java (by language specification) and > CPython use the byte-code/VM scheme. While your answer was technically correct, by omitting pertinent

Re: Python too slow?

2008-01-09 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > And the reference implementation of Python (CPython) is not > interpreted, it's compiled to byte-code, which is then executed by a VM > (just like Java). Wow, this is pretty misleading. Java is, indeed, compiled to bytecode; however, modern JVMs

Re: The best platform and editor for Python

2007-07-06 Thread Ed Jensen
Alex Martelli <[EMAIL PROTECTED]> wrote: > Calling all vi/vim users (and we'll heartily appreciate the support of > TextMate fans, BBEdit ones, etc, etc) -- we're at risk being defined out > of existence, since we're neither happy with Emacs nor wanting anything > like Visual Studio, and yet Kay cl

Re: try/except/else/finally problem

2007-06-28 Thread Ed Jensen
Peter Otten <[EMAIL PROTECTED]> wrote: >> try: >> f = file('test.txt', 'r') >> except IOError: >> print 'except' >> else: >> print 'else' >> finally: >> print 'finally' > You need Python 2.5 for that to work. In older Python versions you have to > nest try...except...else and try.

try/except/else/finally problem

2007-06-28 Thread Ed Jensen
I'm using: Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5 And I'm trying to execute: #! /usr/bin/env python try: f = file('test.txt', 'r') except IOError: print 'except' else: print 'else' finally: print 'finally' And the results are: File "./test.py", line 9 f

Re: Python and Java

2007-04-06 Thread Ed Jensen
Steve Holden <[EMAIL PROTECTED]> wrote: > Ed Jensen wrote: >> Steve Holden <[EMAIL PROTECTED]> wrote: >>> Jython is an implementation of Python that compiles to Java bytecode, >>> but at the moment there's some version lag so it won't handle th

Re: Python and Java

2007-04-05 Thread Ed Jensen
Steve Holden <[EMAIL PROTECTED]> wrote: > Jython is an implementation of Python that compiles to Java bytecode, > but at the moment there's some version lag so it won't handle the mos > recent language enhancements. Probably worth a look, though. > >http://www.jython.org/ Does Jython compil

Re: Problem with global variables

2007-04-02 Thread Ed Jensen
Ed Jensen <[EMAIL PROTECTED]> wrote: > I'm having a vexing problem with global variables in Python. Thanks to everyone who replied. The peculiar way Python handles global variables in functions now makes sense to me. -- http://mail.python.org/mailman/listinfo/python-list

Problem with global variables

2007-04-02 Thread Ed Jensen
I'm having a vexing problem with global variables in Python. Please consider the following Python code: #! /usr/bin/env python def tiny(): bar = [] for tmp in foo: bar.append(tmp) foo = bar if __name__ == "__main__": foo = ['hello', 'world'] tiny() When I try to run

How to determine what exceptions a method might raise?

2007-01-16 Thread Ed Jensen
I'm really enjoying using the Python interactive interpreter to learn more about the language. It's fantastic you can get method help right in there as well. It saves a lot of time. With that in mind, is there an easy way in the interactive interpreter to determine which exceptions a method migh

Re: jython's future

2006-11-14 Thread Ed Jensen
??ukasz Langa <[EMAIL PROTECTED]> wrote: > Java was at 1.2 (and compiling Hello World took over 5 minutes) Bullshit. Complete and utter bullshit. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python component model

2006-10-12 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: > People who bring up stuff about self and indentation are just showing > their ignorance Ouch. That stings. Python's "indentation determines scope" makes it hard for me to discuss Python via mediums like IRC and instant messengers. It also makes it hard t

Re: do people really complain about significant whitespace?

2006-08-09 Thread Ed Jensen
infidel <[EMAIL PROTECTED]> wrote: > Where are they-who-hate-us-for-our-whitespace? Are "they" really that > stupid/petty? Are "they" really out there at all? "They" almost sound > like a mythical caste of tasteless heathens that "we" have invented. > It just sounds like so much trivial nitpicke

Re: Accessors in Python (getters and setters)

2006-07-21 Thread Ed Jensen
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Which puts us to the next question: the sealing itself doesn't do > anything to restrict the code, the SecurityManager does. Which AFAIK is > something hooked into the VM. Now, I'm not on sure grounds here on how > to altere its behaviour, but I'd sa

Re: Accessors in Python (getters and setters)

2006-07-20 Thread Ed Jensen
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Java is not an acronym. That is: it's "Java", not "JAVA". > > Now THAT was an important information RIGHT on topic. It was not meant offensively. >> Java does not allow access to private members via reflection. > > For somebody nitpicking on natur

Re: Accessors in Python (getters and setters)

2006-07-19 Thread Ed Jensen
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Ah, you mean like in JAVA Java is not an acronym. That is: it's "Java", not "JAVA". > where the compiler prevents you from accessing > private variables, but the runtime allows access to these very variables > via reflection? Java does not allow ac

Re: Python vs. Lisp -- please explain

2006-02-23 Thread Ed Jensen
Roy Smith <[EMAIL PROTECTED]> wrote: > BTW, if like Python and haven't looked at Ruby, it's worth a glance. If > Python can be called similar to Lisp, then Ruby is even more so. I'm not > fond of Ruby's perlesqe syntax, but I like many of the fundamental ideas. I can't get over Ruby's ugly syn

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > It's not a "scripting" language, and it's not interpreted. http://www.python.org/doc/faq/general.html#what-is-python "Python is an interpreted, interactive, object-oriented programming language." -- http://mail.python.org/mailman/listinfo/python-l

Re: Python article in Free Software Magazine

2006-01-01 Thread Ed Jensen
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I don't want to nit-pick all my way through the article, which > is very decent and is worth reading, but I will say one more thing: you > describe Python as "an expressive, interpreted language". Python is no > more interpreted than Java. Like Java, it

Re: Python article in Free Software Magazine

2006-01-01 Thread Ed Jensen
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I don't want to nit-pick all my way through the article, which > is very decent and is worth reading, but I will say one more thing: you > describe Python as "an expressive, interpreted language". Python is no > more interpreted than Java. Like Java, it

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Rubin wrote: > Python and *BSD are getting far less volunteer development love than, > say, GCC or Linux, and the licensing is at least part of the reason. I disagree. I believe *BSD gets less volunteer development because of some legal wrangling in the early 90s t

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Christophe <[EMAIL PROTECTED]> wrote: > If you don't like the GPL, then by all means, *do not use GPL code !* > > Please, I mean, when you use without authorisation some code in your > project, you are in trouble, no matter what licence the code was using. I'm not sure why you felt compelled to

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: > We'll have to wait and see what happens. There's a risk that versions > of Python with different semantics or characteristics to the original > could cause the development of parallel communities, instead of > everyone working on/with the same project. The "

Re: wxPython Licence vs GPL

2005-11-24 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: >> I'm aware of this concern. I don't think it's justified. Unless >> you'd like to point out all those closed, proprietary Python >> implementations that are destroying civilization as we know it. > Well, there was some concern voiced at EuroPython that a

Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Grow up, Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: > It's interesting that you bring this tired thought experiment up in the > context of the original remark: "Its license is far more "free" than > GPL is." If we were focusing on the "vox pop" interpretation of the > word "free", that remark wouldn't make any

Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: > That would be "free as in freeloading", right? (And no, I'm not > intending to start a licensing flame war with that remark, but I think > it's inappropriate to ignore central licensing concepts such as > end-user freedoms, and then to make sweeping statemen

Re: Python obfuscation

2005-11-16 Thread Ed Jensen
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I'm not sure if that is meant to be a rhetorical > question or not, but something of the order of 95% of > all software written is never distributed to others, > and so copyright or the lack of copyright is not an issue. Can you cite your source(s) f

Re: Python vs Ruby

2005-10-21 Thread Ed Jensen
Bryan <[EMAIL PROTECTED]> wrote: > i would not say sion's ratio of 5:1 is dubious. for what it's worth, i've > written i pretty complex program in jython over the last year. jython > compiles > to java source code and the number of generated java lines to the jython > lines > is 4:1. Most c

Re: Python vs Ruby

2005-10-21 Thread Ed Jensen
Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > I have here a library (it's the client side of a client-server > interface including a pile of class definitions) which has > implementations in pure C++, Java and Python, taking about 3000, > 3500 and 1500 loc respectively. And there's an associated mod

Re: UI toolkits for Python

2005-10-20 Thread Ed Jensen
Kenneth McDonald <[EMAIL PROTECTED]> wrote: > I'd have to agree with this. Unfortunately, the only way to use Swing > (in a > reasonable manner) from Python is to use Jython, and Jython has other > shortcomings that make me not want to use it. What shortcomings? -- http://mail.python.org/mailma

Re: UI toolkits for Python

2005-10-19 Thread Ed Jensen
Claudio Grondi <[EMAIL PROTECTED]> wrote: > I haven't seen any really platform-independent software yet and I don't > expect to see any in the future. > It is simply not possible to have one, even if much progress was done lately > in many areas in order to try to approach it as close as possible.

Re: extreme newbie

2005-06-18 Thread Ed Jensen
Renato Ramonda <[EMAIL PROTECTED]> wrote: > The only system (apart from solaris, I guess) that has a JVM by default > is OSX, and it's _NOT_ sun's one, but the internally developed one. Apple licenses Sun's JVM and makes the modifications necessary to run it on OSX. I know I'm being a pedant, bu

Re: extreme newbie

2005-06-18 Thread Ed Jensen
Grant Edwards <[EMAIL PROTECTED]> wrote: >> I've guessed that python is purely an interpreted language unless its >> compiled into another language (ie. it needs python installed in order >> to run programs). Is this correct? > > It's just like Java. It's compiled into bytecode and then the > byt