[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 be
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
language and a community.
I'll keep
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't
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
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
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
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 claims
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
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...finally.
Thanks
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 the mos
recent language enhancements. Probably worth a look
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 compile to
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
Ed Jensen [EMAIL PROTECTED] wrote:
I'm having a vexing problem with global variables in Python.
SNIP
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
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
??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
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 to
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 nitpickery that it's
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 say if
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 natural language
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 access to
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 syntax.
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-list
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 is
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 is
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 harm
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 state
Paul Rubin http://[EMAIL PROTECTED] 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 that
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 certain
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 statements
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 sense at all:
Grow up, Steven.
--
http://mail.python.org/mailman/listinfo/python-list
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) for
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 module
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 code
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?
--
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.
Java
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
bytecode is
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, but I
38 matches
Mail list logo