Re: [Python-ideas] Python reviewed

2017-01-11 Thread Chris Barker - NOAA Federal
for range(1,1): means executing once to me. The indexing/slicing approach was designed for indexing and slicing. Then it made sense to have range() match. But range() is not part of the for construction. It is a convenience function for providing an iterable of integers. And you are welcome to

Re: [Python-ideas] Python Reviewed

2017-01-10 Thread Ryan Gonzalez
I just want to point ONE thing out: On Jan 9, 2017 11:18 PM, "Simon Lovell" wrote: * General comment: I posted this because Googling didn't give me a satisfactory answer to why Python is the way that it is. I think I see it now. Guido hates keywords. I don't find this

Re: [Python-ideas] Python Reviewed

2017-01-10 Thread Rob Cliffe
On 10/01/2017 05:18, Simon Lovell wrote: Hi Kyle, I don't see the harm caused from having a do-while construct. Not the most used construct but it is sometimes useful and not having it means you need to either have a first time through marker or a break at the end of a "while True:" loop.

Re: [Python-ideas] Python reviewed

2017-01-10 Thread Steven D'Aprano
On Tue, Jan 10, 2017 at 09:44:31AM +0800, Simon Lovell wrote: > Also in Python you can use: > > for x in range (1,j+1): > > to loop j times. Although it does read as though it is looping j+1 times > to those not familiar. *shrug* To those "not familiar", most language features are mysterious

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Ethan Furman
On 01/09/2017 09:18 PM, Simon Lovell wrote: [snip] This is not the place for this conversation. Please take it to Python List. -- ~Ethan~ ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Simon Lovell
Oh one last thing (I hope), the argument for having the current slice notation by Dijkstra, that it looks messy to have a loop where the contents are never executed or can no longer be executed is ridiculous! That *should* look messy. for range(1,1): means executing once to me. If you had 1

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Simon Lovell
Hi Kyle, I don't see the harm caused from having a do-while construct. Not the most used construct but it is sometimes useful and not having it means you need to either have a first time through marker or a break at the end of a "while True:" loop. I would say that None should also be

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Erik
On 10/01/17 01:44, Simon Lovell wrote: Regarding the logical inconsistency of my argument, well I am saying that I would prefer my redundancy at the end of the loop rather than the beginning. To say that the status quo is better is to say that you prefer your redundancy at the beginning. It's

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Chris Angelico
On Tue, Jan 10, 2017 at 12:44 PM, Simon Lovell wrote: > Regarding the logical inconsistency of my argument, well I am saying that I > would prefer my redundancy at the end of the loop rather than the beginning. > To say that the status quo is better is to say that you

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Simon Lovell
Also in Python you can use: for x in range (1,j+1): to loop j times. Although it does read as though it is looping j+1 times to those not familiar. One more comment I wanted to make about end blocks, is that a respectable editor will add them for you, together with the indentation of the

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Alexander Belopolsky
On Mon, Jan 9, 2017 at 8:19 PM, Chris Barker wrote: > > I think maybe by Dijkstra of C++ fame. Dijkstra is famous for many things, but C++ is another Dutchman's fault. Dijkstra's famous works include "GOTO Considered Harmful" [1] and "How do we tell truths that might

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Chris Barker
Oh, Here is the history of the colon: http://python-history.blogspot.com/2009/02/early-language-design-and-development.html -CHB On Mon, Jan 9, 2017 at 5:30 PM, Chris Barker wrote: > I just noticed a logical inconsistency here: > > The Good: >> Syntactically

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Chris Barker
On Mon, Jan 9, 2017 at 5:12 PM, Simon Lovell wrote: > Re: Counters starting at zero vs one, Fortran has a neat solution to this > for arrays if not strings - allow the programmer to select the starting > index. I liked that back in the day, but I think it's really

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Alexander Belopolsky
On Mon, Jan 9, 2017 at 8:12 PM, Simon Lovell wrote: > Re: Colons. I'm sure I've seen that FAQ before. I may be arrogant but I > can't take it seriously. Being "slightly" easier to read is hardly a reason > for a mandatory structure. > "Readability counts." Did you

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Chris Barker
not even sure why Im engaging, but Note 1) Many of these issues have been widely discussed all over the internet -- I don't think I've seen anything new here. So it would have been nice to do some more research before posting. Now into the fray! > Re:Everything being true of false. I don't

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Simon Lovell
Thanks for the feedback guys. A few quick comments: Re: Colons. I'm sure I've seen that FAQ before. I may be arrogant but I can't take it seriously. Being "slightly" easier to read is hardly a reason for a mandatory structure. Re: PEP249. I thought I'd detailed quite a bit of what I thought

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Steven D'Aprano
On Tue, Jan 10, 2017 at 06:40:34AM +1100, Steven D'Aprano wrote: > particularly when you appear to know the language very well? Of course I mean "don't appear". -- Steve ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Mikhail V
On 9 January 2017 at 12:25, Simon Lovell wrote: > Python Reviewed > > The Good : > ... > The Bad: > ... I agree with many points, but: > No end required for if/while/for blocks. .. Makes the code less readable Nope, it makes code significantly better readable. I'm sort

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Ned Batchelder
On 1/9/17 8:31 AM, Chris Angelico wrote: > On Mon, Jan 9, 2017 at 10:25 PM, Simon Lovell wrote: >> Python Reviewed >> >> Having used a lot of languages a little bit and not finding satisfactory >> answers to these in some cases often asked questions, I thought I'd join >>

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Chris Kaynor
On Mon, Jan 9, 2017 at 11:40 AM, Steven D'Aprano wrote: > On Mon, Jan 09, 2017 at 07:25:45PM +0800, Simon Lovell wrote: >> Lack of a with statement which only obscures the code >Python has a `with` statement. I suspect Simon means similar to the VB with statement, which

Re: [Python-ideas] Python reviewed

2017-01-09 Thread Stephen J. Turnbull
Simon Lovell writes: > Hmm, Thanks Chris. I thought I was posting this to the correct > place. Well, you didn't actually make any specific suggestions, and you describe it as a "review" rather than an RFE. > I've never seen that "for line in open ..." after googling it many > times! Why is

Re: [Python-ideas] Python Reviewed

2017-01-09 Thread Chris Angelico
On Mon, Jan 9, 2017 at 10:25 PM, Simon Lovell wrote: > Python Reviewed > > Having used a lot of languages a little bit and not finding satisfactory > answers to these in some cases often asked questions, I thought I'd join > this group to make a post on the virtues and

[Python-ideas] Python Reviewed

2017-01-09 Thread Simon Lovell
Python Reviewed Having used a lot of languages a little bit and not finding satisfactory answers to these in some cases often asked questions, I thought I'd join this group to make a post on the virtues and otherwise of python. The Good: Syntactically significant new lines