|
Python 3.0 is in beta with a final release coming shortly. Obviously it will take some significant time for general adoption and for it to eventually replace 2.x.
I am writing a tutorial about certain aspects of programming Python. I'm wondering if I ...
Started by Corey Goldberg on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Python 2.x " will be python....
Learn Python 3.0, as contagious suggests.
The article
Python 2.x has been out long enough to build up that it's really not going to matter much.
There are probably very few out there now.
|
|
I'm running windows and the shell/os automatically runs python based on the registry settings when you run a program on the command line. Will this break if I install a 2.x and 3.x version of python on the same machine?
I want to play with 3.0 while still...
Started by minty on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
I would assume so, I....
As far as I know Python runs off of the commandline using the PATH variable as opposed to the version of python you want to use by default, and check the "always use this program to open this kind of file" checkbox.
|
|
Maybe I'm old school, but when I sit down to really tackle a new language I like to buy whatever the definitive book is for that language rather than mess around with tutorials and online intro "toys" to the language.
Python in a Nutshell has gotten glowing...
Started by Bob Somers on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
KeepIf you're going....
Imho you're safe to start learning python 2.
And python 2.x will be here for a long time still.
If you're starting from scratch and won't need.
Of Python 2.x, simply to be aware of the differences.
|
Ask your Facebook Friends
|
I'm a PhD student and use Python to write the code I use for my research. My workflow often consists of making a small change to the code, running the program, seeing whether the results improved, and repeating the process. Because of this, I find myself...
Started by Colin on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
This article said that there were a few points where Python 3.0 was actually slower....
The were definitely performance issues in Python 3.0, but they were largely resolved in Python 3.1.
Performance of the io module please disregard it.
|
|
I have a large infrastructure that is written in Python 2.6, and I recently took a stab at porting to 3.1 (was much smoother than I expected) despite the lack of backwards compatibility.
I eventually want to integrate some of this Python code with a lot...
Started by Uri on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
With....
IOW, port to 3.x in a way so that the code remains compatible with 2.x.
I would expect cycle, it could be a while.
For your code, I recommend to keep it in 2.x changes).
Jython will not support Python 3.x in the near future.
|
|
Just saw a question about, hello world on python!
The answers say's, this is not support in py 3.x. What does this mean, is python not backward compatible? If it is not, I think this is a very big issue, from acceptability and learning point of view.
...
Started by Vivek Sharma on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
That requires Python, learn Python 2.x as frameworks like Django and many corporations still use 2.x.Python 3 (you'd go for 3.1 of course) is a more elegant language, having removed redundancies and minor warts that Python....
|
|
Is there any reason to prefer unicode(somestring, 'utf8') as opposed to somestring.decode('utf8') ?
My only thought is that .decode() is a bound method so python may be able to resolve it more efficiently, but correct me if I'm wrong.
Started by ʞɔıu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There in Python 3.0, while text = b'binarydata'.decode(encoding) is still valid..
|
|
I am trying to make an HTTP request in Python 2.6.4, using the urllib module. Is there any way to set the request headers?
I am sure that this is possible using urllib2, but I would prefer to use urllib since it seems simpler.
Started by mikez302 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
So just use urllib2 rather than writing new code to a deprecated... .
There isn't any way to do that, which is precisely the reason urllib is deprecated in favour of urllib2 .
Check out the documentation of urllib2.Request.
I don't think so, but urllib2 can.
|
|
The purpose of my question is to strengthen my knowledge base with Python and get a better picture of it, which includes knowing its faults and surprises. To keep things specific, I'm only interested in the CPython interpreter.
I'm looking for something...
Started by David on
, 12 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
Consider the following....
A long but thorough explanation of CPython threading in Python.
Well they're not and this is pretty well documented by the Python crowd and even Guido himself.
python threads in CPython to run concurrently...
|
|
I am trying to print an integer in Python 2.6.1 with commas as thousands separators. For example, I want to show the number 1234567 as "1,234,567". How would I go about doing this? I have seen many examples on Google, but I am looking for the simplest...
Started by mikez302 on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
According to python docs it works like.
In python 2.7 there is going to be a format specifier for thousands separator.
I just want to add this for future reference.
There are already some good answers in here.
|