So, what's the real story on Python 2 vs Python 3?
rustompmody at gmail.com
Fri Dec 27 06:43:23 CET 2013
On Fri, Dec 27, 2013 at 10:50 AM, Andrew Berg <robotsondrugs at gmail.com> wrote:
> On 2013.12.26 23:04, Travis McGee wrote:
>> The Python.org site says that the future is Python 3, yet whenever I try
>> something new in Python, such as Tkinter which I am learning now,
>> everything seems to default to Python 2. By this I mean that, whenever I
>> find that I need to install another package, it shows up as Python 2
>> unless I explicitly specify Python 3.
>> What's the deal? If I want to make a distributable software package,
>> should it be 2 or 3? Enquiring minds want to know.
> Oh boy, another 2 vs. 3 thread!
I believe that this is separable into at least two questions:
1. Whats the deal about 2 and 3, as in where on the
past-present-future do these sit
2. How to write software that is 2+3 compatible
As for 1 its the much heat little light kind of discussion. I'll leave
others to warm themselves and the planet
As for 2 maybe we need a wiki page. (Or do we have one already?)
Heres my largely ignoramus attempt at starting that:
1. print: Use print with (). Dont use funny 2 syntax
2. Always write strings with a u" prefix
3. Always use new style classes
4. Always use relative imports with explicit relative (ie use .)
More information about the Python-list