Re: Yet another Python textbook

2012-11-22 Thread Colin J. Williams
From Yet another Python textbook On 21/11/2012 5:17 PM, Chris Angelico wrote: On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams c...@ncf.ca wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest

Re: Yet another Python textbook

2012-11-22 Thread Ian Kelly
On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams c...@ncf.ca wrote: From my reading of the docs, it seems to me that the three following should be equivalent: (a) formattingStr.format(values) with (b) format(values, formattingStr) or (c) tupleOfValues.__format__(formattingStr

Re: Yet another Python textbook

2012-11-22 Thread Terry Reedy
On 11/22/2012 7:24 AM, Colin J. Williams wrote: From my reading of the docs, it seems to me that the three following should be equivalent: We read differently... (a) formattingStr.format(values) Where 'values' is multiple arguments with (b) format(values, formattingStr)

Re: Yet another Python textbook

2012-11-22 Thread Colin J. Williams
On 22/11/2012 1:27 PM, Ian Kelly wrote: On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams c...@ncf.ca wrote: From my reading of the docs, it seems to me that the three following should be equivalent: (a) formattingStr.format(values) with (b) format(values, formattingStr) or (c)

Re: Yet another Python textbook

2012-11-22 Thread Joshua Landau
On 22 November 2012 22:41, Colin J. Williams c...@ncf.ca wrote: On 22/11/2012 1:27 PM, Ian Kelly wrote: On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams c...@ncf.ca wrote: From my reading of the docs, it seems to me that the three following should be equivalent: (a)

Re: Yet another Python textbook

2012-11-22 Thread Steven D'Aprano
On Thu, 22 Nov 2012 17:41:22 -0500, Colin J. Williams wrote: You and I used __format__. I understand that the use of double underscore functions is deprecated. Double leading and trailing underscore methods are not deprecated, they are very much part of the public interface. But they are

Re: Yet another Python textbook

2012-11-22 Thread Alec Taylor
No worries, I've just sent you my pull-request :) On Thu, Nov 22, 2012 at 1:11 PM, Pavel Solin solin.pa...@gmail.com wrote: Hi Alec, Can you put your website—http://femhub.com/textbook-python/—on your github—https://github.com/femhub/nclab-textbook-python? Done, thank you so much. I

Re: Yet another Python textbook

2012-11-21 Thread wxjmfauth
Le mardi 20 novembre 2012 22:00:49 UTC+1, Chris Angelico a écrit : On Wed, Nov 21, 2012 at 1:57 AM, wxjmfa...@gmail.com wrote: - To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. No. Not at all. I'm mainly and deeply disappointed. jmf --

Re: Yet another Python textbook

2012-11-21 Thread Colin J. Williams
On 20/11/2012 4:00 PM, Chris Angelico wrote: On Wed, Nov 21, 2012 at 1:57 AM, wxjmfa...@gmail.com wrote: Le mardi 20 novembre 2012 09:09:50 UTC+1, Chris Angelico a écrit : On Tue, Nov 20, 2012 at 7:02 PM, Pavel Solin solin.pa...@gmail.com wrote: Perhaps you are right. Is there any

Re: Yet another Python textbook

2012-11-21 Thread Chris Angelico
On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams c...@ncf.ca wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the world sees this as a huge advantage. Python is now in a VERY small group

Re: Yet another Python textbook

2012-11-21 Thread Dave Angel
On 11/21/2012 05:17 PM, Chris Angelico wrote: snip That said, though, I'm just glad that %-formatting is staying. It's an extremely expressive string formatting method, and exists in many languages (thanks to C's heritage). Pike's version is insanely powerful, Python's is more like C's, but

Re: Yet another Python textbook

2012-11-21 Thread Ian Kelly
On Wed, Nov 21, 2012 at 3:58 PM, Dave Angel d...@davea.name wrote: Some don't realize that one very powerful use for the .format style of working is that it makes localization much more straightforward. With the curly brace approach, one can translate the format string into another language,

Re: Yet another Python textbook

2012-11-21 Thread Joshua Landau
On 21 November 2012 22:17, Chris Angelico ros...@gmail.com wrote: On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams c...@ncf.ca wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the

Re: Yet another Python textbook

2012-11-21 Thread Steven D'Aprano
On Wed, 21 Nov 2012 12:03:30 -0500, Colin J. Williams wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the world sees this as a huge advantage. Python is now in a VERY small group of

Re: Yet another Python textbook

2012-11-21 Thread Mark Lawrence
On 21/11/2012 23:21, Joshua Landau wrote: On 21 November 2012 22:17, Chris Angelico ros...@gmail.com wrote: On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams c...@ncf.ca wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393

Re: Yet another Python textbook

2012-11-21 Thread Ian Kelly
On Wed, Nov 21, 2012 at 4:21 PM, Joshua Landau joshua.landau...@gmail.com wrote: {}.format() is a blessing an % () should go. % has no relevance to strings, is hard to get and has an appalling* syntax. Having two syntaxes just makes things less obvious, and the right choice rarer. str.format

Re: Yet another Python textbook

2012-11-21 Thread Pavel Solin
Hi Alec, Can you put your website—http://femhub.com/textbook-python/—on your github—https://github.com/femhub/nclab-textbook-python? Done, thank you so much. I edited the textbook based on responses that I received. Based on several inquiries we also decided to add Python 3.2 to NCLab. New

Re: Yet another Python textbook

2012-11-21 Thread Terry Reedy
On 11/21/2012 6:21 PM, Joshua Landau wrote: Since we've decided to derail the conversation... {}.format() is a blessing an % () should go. % has no relevance to strings, is hard to get and has an appalling* syntax. Having two syntaxes just makes things less obvious, and the right choice

Re: Yet another Python textbook

2012-11-20 Thread Pavel Solin
Hi Ian, thank you for your comments. On Mon, Nov 19, 2012 at 11:46 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Nov 18, 2012 at 10:30 PM, Pavel Solin solin.pa...@gmail.com wrote: I would like to introduce a new Python textbook aimed at high school students:

Re: Yet another Python textbook

2012-11-20 Thread Chris Angelico
On Tue, Nov 20, 2012 at 7:02 PM, Pavel Solin solin.pa...@gmail.com wrote: Perhaps you are right. Is there any statistics of how many Python programmers are using 2.7 vs. 3? Most of people I know use 2.7. If you're teaching Python, the stats are probably about zero for zero. Start them off on

Re: Yet another Python textbook

2012-11-20 Thread Steven D'Aprano
On Mon, 19 Nov 2012 17:58:55 +0100, Kwpolska wrote: On Mon, Nov 19, 2012 at 6:30 AM, Pavel Solin solin.pa...@gmail.com wrote: I would like to introduce a new Python textbook aimed at high school students: http://femhub.com/textbook-python/. The textbook is open source and its public Git

Re: Yet another Python textbook

2012-11-20 Thread wxjmfauth
Le mardi 20 novembre 2012 09:09:50 UTC+1, Chris Angelico a écrit : On Tue, Nov 20, 2012 at 7:02 PM, Pavel Solin solin.pa...@gmail.com wrote: Perhaps you are right. Is there any statistics of how many Python programmers are using 2.7 vs. 3? Most of people I know use 2.7. If you're

Re: Yet another Python textbook

2012-11-20 Thread Ian Kelly
On Tue, Nov 20, 2012 at 1:02 AM, Pavel Solin solin.pa...@gmail.com wrote: There is an ongoing discussion but we are not sure. Are there any reasons except for the print () command and division of integers? The big one is that Python 3 holds the future of Python development. There are no more

Re: Yet another Python textbook

2012-11-20 Thread Chris Angelico
On Wed, Nov 21, 2012 at 1:57 AM, wxjmfa...@gmail.com wrote: Le mardi 20 novembre 2012 09:09:50 UTC+1, Chris Angelico a écrit : On Tue, Nov 20, 2012 at 7:02 PM, Pavel Solin solin.pa...@gmail.com wrote: Perhaps you are right. Is there any statistics of how many Python programmers are using

Re: Yet another Python textbook

2012-11-20 Thread Terry Reedy
On 11/20/2012 3:02 AM, Pavel Solin wrote: previous page that Python 3 was released in 2008. Is there any work underway get Python 3 into NCLab? There is an ongoing discussion but we are not sure. Are there any reasons except for the print () command and division of integers? (In

Re: Yet another Python textbook

2012-11-20 Thread Mark Lawrence
On 20/11/2012 21:00, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the world sees this as a huge advantage. Python is now in a VERY small group of languages (I'm aware of just one other) that have absolutely proper

Re: Yet another Python textbook

2012-11-20 Thread Chris Angelico
On Wed, Nov 21, 2012 at 8:55 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 20/11/2012 21:00, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the world sees this as a huge advantage. Python is now in a VERY

Re: Yet another Python textbook

2012-11-19 Thread Kwpolska
On Mon, Nov 19, 2012 at 6:30 AM, Pavel Solin solin.pa...@gmail.com wrote: I would like to introduce a new Python textbook aimed at high school students: http://femhub.com/textbook-python/. The textbook is open source and its public Git repository is located at Github:

Re: Yet another Python textbook

2012-11-19 Thread alex23
On Nov 20, 2:58 am, Kwpolska kwpol...@gmail.com wrote: You are writing it for something called “NCLab”, not for the general public, and that sucks. And making it available to the general public to consume. What's wrong with writing for one audience and providing for a broader? If you're that

Re: Yet another Python textbook

2012-11-19 Thread Ian Kelly
On Sun, Nov 18, 2012 at 10:30 PM, Pavel Solin solin.pa...@gmail.com wrote: I would like to introduce a new Python textbook aimed at high school students: http://femhub.com/textbook-python/. The textbook is open source and its public Git repository is located at Github:

Yet another Python textbook

2012-11-18 Thread Pavel Solin
I would like to introduce a new Python textbook aimed at high school students: http://femhub.com/textbook-python/. The textbook is open source and its public Git repository is located at Github: g...@github.com:femhub/nclab-textbook-python.git Feedback and contributions are very much welcome,