Message: 7 Date: Wed, 02 Oct 2013 20:50:31 +0200 From: vit...@gmx.com To: tutor@python.org Subject: [Tutor] Which Python should a beginner learn? Message-ID: <524c6af7.5020...@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed
Which version of Python should a beginner learn? 2.x or 3.x? ------------------------------ 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... 2013/10/3 <tutor-requ...@python.org> > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to > tutor-requ...@python.org > > You can reach the person managing the list at > tutor-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > > 1. Re: Arbitrary-argument set function (bob gailer) > 2. Re: sqlite3 COMMIT directive (Mark Lawrence) > 3. Python version prior to 02/26/2006? (Fast Primes) > 4. Re: Python version prior to 02/26/2006? (Joel Goldstick) > 5. Re: Python version prior to 02/26/2006? (Dave Angel) > 6. Re: Python version prior to 02/26/2006? (Steven D'Aprano) > 7. Which Python should a beginner learn? (vit...@gmx.com) > 8. Re: Which Python should a beginner learn? (Mark Lawrence) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 02 Oct 2013 08:05:55 -0400 > From: bob gailer <bgai...@gmail.com> > To: Spyros Charonis <s.charo...@gmail.com> > Cc: tutor <tutor@python.org> > Subject: Re: [Tutor] Arbitrary-argument set function > Message-ID: <524c0c23....@gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 10/1/2013 6:43 PM, Spyros Charonis wrote: > > > > Dear Pythoners, > > > > > > I am trying to extract from a set of about 20 sequences, the > > characters which are unique to each sequence. For simplicity, imagine > > I have only 3 "sequences" (words in this example) such as: > > > > > > s1='spam'; s2='scam', s3='slam' > > > > > > I would like the character that is unique to each sequence, i.e. I > > need my function to return the list [ 'p', 'c', ',l' ]. This function > > I am using is as follows: > > > > > > def uniq(*args): > > > > """ FIND UNIQUE ELEMENTS OF AN ARBITRARY NUMBER OF SEQUENCES""" > > > > unique = [] > > > > for i in args[0]: > > > > if: > > > > unique.append(i) > > > > return unique > > > > > > and is returning the list [ 's', 'p', 'a', 'm' ]. Any help much > > appreciated, > > > Problems with the above. > 1 - where is the call to the function? (we can only guess what you fed it.) > 2 - for i in args[0]: tests each character in only the first argument > 3 - i not in args[1:] will always be True. Why? > 4 - "characters which are unique to each sequence" is hard to translate. > Did you mean > "characters which appear in exactly one sequence"? > > BTW this sounds like homework; we are willing to give some assistance > with HW but we need you to put more effort into your design and testing. > > I suggest you either run the program in some tool that will show you > clearly what happens at each step or "desk check" it - pretend you are > the computer and go step by step, making sure you know what each line > does. No guessing. You always have the interactive prompt to test > things, and the documentation to explain things. > > -- > Bob Gailer > 919-636-4239 > Chapel Hill NC > > > > ------------------------------ > > Message: 2 > Date: Wed, 02 Oct 2013 15:51:53 +0100 > From: Mark Lawrence <breamore...@yahoo.co.uk> > To: tutor@python.org > Subject: Re: [Tutor] sqlite3 COMMIT directive > Message-ID: <l2hbu5$1e2$1...@ger.gmane.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 01/10/2013 12:05, Alan Gauld wrote: > > On 01/10/13 11:41, Tim Golden wrote: > > > >>>>> Python, the database starts and ends transactions automatically from > >>>>> within the execute() function. > >>>> > >>>> Not so, I'm afraid. If you want autocommit, you need to send an > >>>> isolation_level of None to the .connect function. > > > >>> """ > >>> Connection objects can be used as context managers that automatically > >>> commit or rollback transactions. > >> > >> You're sort-of correct. What happens is that the database doesn't enter > >> autocommit mode (you'll still need to specify the right isolation level > >> on the .connect for that). Rather, the __exit__ method of the > >> connection-as-context-manager issues the db.commit() call which will > >> commit anything outstanding. > > > > OK, That makes sense it's a bit like the file close at the end of a with > > block. So the docs statement that it automatically commits > > *transactions* is slightly misleading as it only commits the full > > content of the block which could hold multiple transactions. > > > > Thanks for the clarification Tim. > > > > I haven't followed this too closely as my SQL skills (like many others) > are sadly out of date, but is it worth the hassle of raising an issue on > the bug tracker to get the relevant docs changed, or is "slightly > misleading" actually close enough? > > -- > Roses are red, > Violets are blue, > Most poems rhyme, > But this one doesn't. > > Mark Lawrence > > > > ------------------------------ > > Message: 3 > Date: Wed, 2 Oct 2013 13:44:11 -0400 > From: Fast Primes <fast_pri...@hotmail.com> > To: "tutor@python.org" <tutor@python.org> > Subject: [Tutor] Python version prior to 02/26/2006? > Message-ID: <bay174-w30c306657d8c7b571f64ca80...@phx.gbl> > Content-Type: text/plain; charset="iso-8859-1" > > I have a python program written in 02/26/2006. Can I still get a version > of python that will run it? > If so, which version and from where can I get it? > Thx. > fp > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/tutor/attachments/20131002/50f15a06/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Wed, 2 Oct 2013 13:49:05 -0400 > From: Joel Goldstick <joel.goldst...@gmail.com> > To: Fast Primes <fast_pri...@hotmail.com> > Cc: "tutor@python.org" <tutor@python.org> > Subject: Re: [Tutor] Python version prior to 02/26/2006? > Message-ID: > < > capm-o+zys4tkvuo+vgs_ut9q4bkzpwam3m+buax0k7+bc-g...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Wed, Oct 2, 2013 at 1:44 PM, Fast Primes <fast_pri...@hotmail.com> > wrote: > > I have a python program written in 02/26/2006. Can I still get a version > of > > python that will run it? > > > > If so, which version and from where can I get it? > > > > Thx. > > > > fp > > > > _______________________________________________ > > Tutor maillist - Tutor@python.org > > To unsubscribe or change subscription options: > > https://mail.python.org/mailman/listinfo/tutor > > > you should try to run it with the latest version of the 2.x series - 2.7 > > If you find problems that you don't want to fix, you can always load > any version of python on your system. Find the one that was current > in 2006. See the python.org site for getting different versions > > Version 3.x series made changes that are not backward compatible with > the 2.x series. > > > -- > Joel Goldstick > http://joelgoldstick.com > > > ------------------------------ > > Message: 5 > Date: Wed, 2 Oct 2013 18:04:48 +0000 (UTC) > From: Dave Angel <da...@davea.name> > To: tutor@python.org > Subject: Re: [Tutor] Python version prior to 02/26/2006? > Message-ID: <l2hn7u$hk2$1...@ger.gmane.org> > Content-Type: text/plain; charset=US-ASCII > > On 2/10/2013 13:44, Fast Primes wrote: > > > I have a python program written in 02/26/2006. Can I still get a version > of python that will run it? > > If so, which version and from where can I get it? > > Thx. > > fp > > > > <html> > > <head> > > <style><!-- > > .hmmessage P > > { > > margin:0px; > > padding:0px > > } > > body.hmmessage > > { > > font-size: 12pt; > > font-family:Calibri > > } > > --></style></head> > > <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? <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> > > </html> > > > > (Please post using text email, as this is a text newsgroup) > > The first line of the script should indicate what version of Python it > was written for. If not, chances are good that 2.7.5 will be fine. > > http://www.python.org/download/ > > > > -- > DaveA > > > > > ------------------------------ > > Message: 6 > Date: Thu, 3 Oct 2013 04:04:00 +1000 > From: Steven D'Aprano <st...@pearwood.info> > To: tutor@python.org > Subject: Re: [Tutor] Python version prior to 02/26/2006? > Message-ID: <20131002180400.GO7989@ando> > Content-Type: text/plain; charset=us-ascii > > On Wed, Oct 02, 2013 at 01:44:11PM -0400, Fast Primes wrote: > > I have a python program written in 02/26/2006. Can I still get a version > of python that will run it? > > If so, which version and from where can I get it? > > Yes. All versions of Python going back to version 1.1 are still > available, although the oldest ones may be difficult to install on some > systems. > > What is important though is not *when* the program was written, but what > version of Python it was written for. I could write a program today, > targetting Python 1.5, if I was foolish. > > If your program is very short, you might like to show it to us. Or read > the documentation -- does it tell you what version of Python it > requires? Perhaps it has a line at the top of the file like: > > #!/usr/bin/python2.4 > > But there is a very good chance that it will run perfectly using the > latest Python 2.7. If not, it will probably be quite simple to fix it so > that it will run. Fixing it to run under Python 3.3 will probably be a > bit more work. > > You can download Python versions from here: > > http://www.python.org/download/releases/ > > but seriously, you should try to avoid anything older than 2.7 unless > you absolutely need it. > > > -- > Steven > > > ------------------------------ > > Message: 7 > Date: Wed, 02 Oct 2013 20:50:31 +0200 > From: vit...@gmx.com > To: tutor@python.org > Subject: [Tutor] Which Python should a beginner learn? > Message-ID: <524c6af7.5020...@gmx.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Which version of Python should a beginner learn? 2.x or 3.x? > > > ------------------------------ > > Message: 8 > Date: Thu, 03 Oct 2013 00:59:12 +0100 > From: Mark Lawrence <breamore...@yahoo.co.uk> > To: tutor@python.org > Subject: Re: [Tutor] Which Python should a beginner learn? > Message-ID: <l2ic0b$l2s$1...@ger.gmane.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 02/10/2013 19:50, vit...@gmx.com wrote: > > Which version of Python should a beginner learn? 2.x or 3.x? > > > > Python 3 is the future so learn it unless you want to use a specific > library which hasn't yet been ported. > > -- > Roses are red, > Violets are blue, > Most poems rhyme, > But this one doesn't. > > Mark Lawrence > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Tutor maillist - Tutor@python.org > https://mail.python.org/mailman/listinfo/tutor > > > ------------------------------ > > End of Tutor Digest, Vol 116, Issue 8 > ************************************* >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor