<div dir="ltr"><br>Message: 7<br>Date: Wed, 02 Oct 2013 20:50:31 +0200<br>From: <a href="mailto:vitsen@gmx.com"><font color="#0066cc">vitsen@gmx.com</font></a><br>To: <a href="mailto:tutor@python.org"><font color="#0066cc">tutor@python.org</font></a><br>
Subject: [Tutor] Which Python should a beginner learn?<br>Message-ID: <<a href="mailto:524C6AF7.5020001@gmx.com"><font color="#0066cc">524C6AF7.5020001@gmx.com</font></a>><br>Content-Type: text/plain; charset=UTF-8; format=flowed<br>
<br>Which version of Python should a beginner learn? 2.x or 3.x?<br><br><br>------------------------------<br>Python 3 is the way forward, and it is not more difficult than Python 2. The frameworks/packages are becomming increasingly available for Python 3. Yet if you are aiming at using a particular package  that is not yet ported on Python 3, you may have to go through Python 2...</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/3  <span dir="ltr"><<a href="mailto:tutor-request@python.org" target="_blank">tutor-request@python.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send Tutor mailing list submissions to<br>
        <a href="mailto:tutor@python.org">tutor@python.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:tutor-request@python.org">tutor-request@python.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:tutor-owner@python.org">tutor-owner@python.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Tutor digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Arbitrary-argument set function (bob gailer)<br>
   2. Re: sqlite3 COMMIT directive (Mark Lawrence)<br>
   3. Python version prior to 02/26/2006? (Fast Primes)<br>
   4. Re: Python version prior to 02/26/2006? (Joel Goldstick)<br>
   5. Re: Python version prior to 02/26/2006? (Dave Angel)<br>
   6. Re: Python version prior to 02/26/2006? (Steven D'Aprano)<br>
   7. Which Python should a beginner learn? (<a href="mailto:vitsen@gmx.com">vitsen@gmx.com</a>)<br>
   8. Re: Which Python should a beginner learn? (Mark Lawrence)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 02 Oct 2013 08:05:55 -0400<br>
From: bob gailer <<a href="mailto:bgailer@gmail.com">bgailer@gmail.com</a>><br>
To: Spyros Charonis <<a href="mailto:s.charonis@gmail.com">s.charonis@gmail.com</a>><br>
Cc: tutor <<a href="mailto:tutor@python.org">tutor@python.org</a>><br>
Subject: Re: [Tutor] Arbitrary-argument set function<br>
Message-ID: <<a href="mailto:524C0C23.107@gmail.com">524C0C23.107@gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 10/1/2013 6:43 PM, Spyros Charonis wrote:<br>
><br>
> Dear Pythoners,<br>
><br>
><br>
> I am trying to extract from a set of about 20 sequences, the<br>
> characters which are unique to each sequence. For simplicity, imagine<br>
> I have only 3 "sequences" (words in this example) such as:<br>
><br>
><br>
> s1='spam'; s2='scam', s3='slam'<br>
><br>
><br>
> I would like the character that is unique to each sequence, i.e. I<br>
> need my function to return the list [ 'p', 'c', ',l' ]. This function<br>
> I am using is as follows:<br>
><br>
><br>
> def uniq(*args):<br>
><br>
>     """ FIND UNIQUE ELEMENTS OF AN ARBITRARY NUMBER OF SEQUENCES"""<br>
><br>
>     unique = []<br>
><br>
>     for i in args[0]:<br>
><br>
>         if:<br>
><br>
>            unique.append(i)<br>
><br>
>     return unique<br>
><br>
><br>
> and is returning the list [ 's', 'p', 'a', 'm' ]. Any help much<br>
> appreciated,<br>
><br>
Problems with the above.<br>
1 - where is the call to the function? (we can only guess what you fed it.)<br>
2 - for i in args[0]: tests each character in only the first argument<br>
3 - i not in args[1:] will always be True. Why?<br>
4 - "characters which are unique to each sequence" is hard to translate.<br>
Did you mean<br>
"characters which appear in exactly one sequence"?<br>
<br>
BTW this sounds like homework; we are willing to give some assistance<br>
with HW but we need you to put more effort into your design and testing.<br>
<br>
I suggest you either run the program in some tool that will show you<br>
clearly what happens at each step or "desk check" it - pretend you are<br>
the computer and go step by step, making sure you know what each line<br>
does. No guessing. You always have the interactive prompt to test<br>
things, and the documentation to explain things.<br>
<br>
--<br>
Bob Gailer<br>
919-636-4239<br>
Chapel Hill NC<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 02 Oct 2013 15:51:53 +0100<br>
From: Mark Lawrence <<a href="mailto:breamoreboy@yahoo.co.uk">breamoreboy@yahoo.co.uk</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] sqlite3 COMMIT directive<br>
Message-ID: <l2hbu5$1e2$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 01/10/2013 12:05, Alan Gauld wrote:<br>
> On 01/10/13 11:41, Tim Golden wrote:<br>
><br>
>>>>> Python, the database starts and ends transactions automatically from<br>
>>>>> within the execute() function.<br>
>>>><br>
>>>> Not so, I'm afraid. If you want autocommit, you need to send an<br>
>>>> isolation_level of None to the .connect function.<br>
><br>
>>> """<br>
>>> Connection objects can be used as context managers that automatically<br>
>>> commit or rollback transactions.<br>
>><br>
>> You're sort-of correct. What happens is that the database doesn't enter<br>
>> autocommit mode (you'll still need to specify the right isolation level<br>
>> on the .connect for that). Rather, the __exit__ method of the<br>
>> connection-as-context-manager issues the db.commit() call which will<br>
>> commit anything outstanding.<br>
><br>
> OK, That makes sense it's a bit like the file close at the end of a with<br>
> block. So the docs statement that it automatically commits<br>
> *transactions* is slightly misleading as it only commits the full<br>
> content of the block which could hold multiple transactions.<br>
><br>
> Thanks for the clarification Tim.<br>
><br>
<br>
I haven't followed this too closely as my SQL skills (like many others)<br>
are sadly out of date, but is it worth the hassle of raising an issue on<br>
the bug tracker to get the relevant docs changed, or is "slightly<br>
misleading" actually close enough?<br>
<br>
--<br>
Roses are red,<br>
Violets are blue,<br>
Most poems rhyme,<br>
But this one doesn't.<br>
<br>
Mark Lawrence<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 2 Oct 2013 13:44:11 -0400<br>
From: Fast Primes <<a href="mailto:fast_primes@hotmail.com">fast_primes@hotmail.com</a>><br>
To: "<a href="mailto:tutor@python.org">tutor@python.org</a>" <<a href="mailto:tutor@python.org">tutor@python.org</a>><br>
Subject: [Tutor] Python version prior to 02/26/2006?<br>
Message-ID: <BAY174-W30C306657D8C7B571F64CA80160@phx.gbl><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I have a python program written in 02/26/2006. Can I still get a version of python that will run it?<br>
If so, which version and from where can I get it?<br>
Thx.<br>
fp<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/tutor/attachments/20131002/50f15a06/attachment-0001.html" target="_blank">http://mail.python.org/pipermail/tutor/attachments/20131002/50f15a06/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 2 Oct 2013 13:49:05 -0400<br>
From: Joel Goldstick <<a href="mailto:joel.goldstick@gmail.com">joel.goldstick@gmail.com</a>><br>
To: Fast Primes <<a href="mailto:fast_primes@hotmail.com">fast_primes@hotmail.com</a>><br>
Cc: "<a href="mailto:tutor@python.org">tutor@python.org</a>" <<a href="mailto:tutor@python.org">tutor@python.org</a>><br>
Subject: Re: [Tutor] Python version prior to 02/26/2006?<br>
Message-ID:<br>
        <<a href="mailto:CAPM-O%2BzyS4TkvuO%2BVGs_ut9Q4bkZPwAm3M%2BbuAx0K7%2BBc-G-_A@mail.gmail.com">CAPM-O+zyS4TkvuO+VGs_ut9Q4bkZPwAm3M+buAx0K7+Bc-G-_A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Wed, Oct 2, 2013 at 1:44 PM, Fast Primes <<a href="mailto:fast_primes@hotmail.com">fast_primes@hotmail.com</a>> wrote:<br>
> I have a python program written in 02/26/2006. Can I still get a version of<br>
> python that will run it?<br>
><br>
> If so, which version and from where can I get it?<br>
><br>
> Thx.<br>
><br>
> fp<br>
><br>
> _______________________________________________<br>
> Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
> To unsubscribe or change subscription options:<br>
> <a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
><br>
you should try to run it with the latest version of the 2.x series  - 2.7<br>
<br>
If you find problems that you don't want to fix, you can always load<br>
any version of python on your system.  Find the one that was current<br>
in 2006.  See the <a href="http://python.org" target="_blank">python.org</a> site for getting different versions<br>
<br>
Version 3.x series made changes that are not backward compatible with<br>
the 2.x series.<br>
<br>
<br>
--<br>
Joel Goldstick<br>
<a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 2 Oct 2013 18:04:48 +0000 (UTC)<br>
From: Dave Angel <<a href="mailto:davea@davea.name">davea@davea.name</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Python version prior to 02/26/2006?<br>
Message-ID: <l2hn7u$hk2$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=US-ASCII<br>
<br>
On 2/10/2013 13:44, Fast Primes wrote:<br>
<br>
> I have a python program written in 02/26/2006. Can I still get a version of python that will run it?<br>
> If so, which version and from where can I get it?<br>
> Thx.<br>
> fp<br>
><br>
> <html><br>
> <head><br>
> <style><!--<br>
> .hmmessage P<br>
> {<br>
> margin:0px;<br>
> padding:0px<br>
> }<br>
> body.hmmessage<br>
> {<br>
> font-size: 12pt;<br>
> font-family:Calibri<br>
> }<br>
> --></style></head><br>
> <body class='hmmessage'><div dir='ltr'>I have a python program written in 02/26/2006. Can I still get a version of python that will run it?&nbsp;<div><br></div><div>If so, which version and from where can I get it?</div><div><br></div><div>Thx.</div><div><br></div><div>fp</div>                                          </div></body><br>

> </html><br>
><br>
<br>
(Please post using text email, as this is a text newsgroup)<br>
<br>
The first line of the script should indicate what version of Python it<br>
was written for.  If not, chances are good that 2.7.5 will be fine.<br>
<br>
<a href="http://www.python.org/download/" target="_blank">http://www.python.org/download/</a><br>
<br>
<br>
<br>
--<br>
DaveA<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Thu, 3 Oct 2013 04:04:00 +1000<br>
From: Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Python version prior to 02/26/2006?<br>
Message-ID: <20131002180400.GO7989@ando><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Wed, Oct 02, 2013 at 01:44:11PM -0400, Fast Primes wrote:<br>
> I have a python program written in 02/26/2006. Can I still get a version of python that will run it?<br>
> If so, which version and from where can I get it?<br>
<br>
Yes. All versions of Python going back to version 1.1 are still<br>
available, although the oldest ones may be difficult to install on some<br>
systems.<br>
<br>
What is important though is not *when* the program was written, but what<br>
version of Python it was written for. I could write a program today,<br>
targetting Python 1.5, if I was foolish.<br>
<br>
If your program is very short, you might like to show it to us. Or read<br>
the documentation -- does it tell you what version of Python it<br>
requires? Perhaps it has a line at the top of the file like:<br>
<br>
#!/usr/bin/python2.4<br>
<br>
But there is a very good chance that it will run perfectly using the<br>
latest Python 2.7. If not, it will probably be quite simple to fix it so<br>
that it will run. Fixing it to run under Python 3.3 will probably be a<br>
bit more work.<br>
<br>
You can download Python versions from here:<br>
<br>
<a href="http://www.python.org/download/releases/" target="_blank">http://www.python.org/download/releases/</a><br>
<br>
but seriously, you should try to avoid anything older than 2.7 unless<br>
you absolutely need it.<br>
<br>
<br>
--<br>
Steven<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Wed, 02 Oct 2013 20:50:31 +0200<br>
From: <a href="mailto:vitsen@gmx.com">vitsen@gmx.com</a><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: [Tutor] Which Python should a beginner learn?<br>
Message-ID: <<a href="mailto:524C6AF7.5020001@gmx.com">524C6AF7.5020001@gmx.com</a>><br>
Content-Type: text/plain; charset=UTF-8; format=flowed<br>
<br>
Which version of Python should a beginner learn? 2.x or 3.x?<br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Thu, 03 Oct 2013 00:59:12 +0100<br>
From: Mark Lawrence <<a href="mailto:breamoreboy@yahoo.co.uk">breamoreboy@yahoo.co.uk</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Which Python should a beginner learn?<br>
Message-ID: <l2ic0b$l2s$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 02/10/2013 19:50, <a href="mailto:vitsen@gmx.com">vitsen@gmx.com</a> wrote:<br>
> Which version of Python should a beginner learn? 2.x or 3.x?<br>
><br>
<br>
Python 3 is the future so learn it unless you want to use a specific<br>
library which hasn't yet been ported.<br>
<br>
--<br>
Roses are red,<br>
Violets are blue,<br>
Most poems rhyme,<br>
But this one doesn't.<br>
<br>
Mark Lawrence<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Tutor Digest, Vol 116, Issue 8<br>
*************************************<br>
</blockquote></div><br></div>