[Tutor] Which version of python should i use?

Amit Saha amitsaha.in at gmail.com
Tue May 21 04:03:41 CEST 2013


Hello Amal,

On Mon, May 20, 2013 at 11:24 PM, Amal Thomas <amalthomas111 at gmail.com> wrote:
> Thank you very much..!! I am starting to learn python for my Bioinformatics
> work, so I would look for the version that has libraries helpful for me..

Do you already have any libraries in mind (or aware of) that  you
would want to use? I came across this link:
http://intro-prog-bioinfo-2012.wikispaces.com/, which doesn't seem to
use any specific tools other than the "generic" libraries that are
pretty much common in any scientific work involving Python: SciPy,
Numpy, etc.

The rule of thumb would probably be "If you don't have any particular
library that you are looking to use and it doesn't yet support Python
3, then you may as well learn Python 3", since that is the future. I
think you may need to spend some time deciding this one. However that
said, why not start with Python 3? The programming language syntax and
style won't be different if you need to go by chance and use Python 2
at some other point of time.


Hope that helps.
-Amit.


>
>
> On Mon, May 20, 2013 at 6:38 PM, Dave Angel <davea at davea.name> wrote:
>>
>> On 05/20/2013 05:59 AM, Amal Thomas wrote:
>>>
>>> hi,
>>>     I am a beginner. I am using a unix sytem (ubuntu 12.10). Python 2.7.3
>>> is installed in my system. I found out that Python has version upto
>>> 3.3.2.
>>
>>
>> Welcome, and thanks for telling us your environment up front.
>>
>>
>>
>>> Should I update my python version?
>>
>>
>> No.  Your OS has lots of dependencies on that installed Python, and if you
>> remove that one (eg. replace it), many things will stop working.
>>
>> HOWEVER, you can install a second Python, of whatever version, and use
>> that for all your own experimenting and learning.  So the question is which
>> one you should use for learning.  My comments at the end.
>>
>>
>>> Is the syntaxes of the each version
>>> different?
>>>
>>
>> Yes.  Not only syntax but semantics as well.  Version 3.0 was deliberately
>> a breaking update, where many of the painful gotchas in the language were
>> fixed, even if it meant things were incompatible.  There is a 2to3 utility,
>> but the transition can be painful for large programs.
>>
>> Which one should you learn on?
>>
>> #1 --- if you're committed to a particular tutorial, use the version that
>> matches the tutorial.  At your stage, you don't want to have to convert
>> every example in your head before getting it to work.
>>
>> #2 --- If you have a particular library or libraries that you plan to use,
>> and it's only currently available for one version, then use that version.
>>
>> #3 --- If neither of the above apply, then use 3.3 or the soon-coming 3.4.
>>
>> What's different?  For a beginner, the most noticeable different is that
>> the print statement in 2.x was replaced by a print function in 3.x  For
>> really simple cases, that just means slap a parentheses around the
>> argument(s).  But the print statement has syntax for redirecting to a file,
>> while the print function has a parameter.  And the technique for suppressing
>> the trailing newline is different.  Etc.
>>
>> The second most noticeable difference is that 3.x handles Unicode
>> directly, so that a string is Unicode, and if you want bytes, those are
>> different.
>>
>>
>>
>>
>> --
>> DaveA
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>
>
>
>
> --
> AMAL THOMAS
> Third Year Undergraduate Student
> Department of Biotechnology
> IIT KHARAGPUR-721302
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



--
http://echorand.me


More information about the Tutor mailing list