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 wr
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 particularly logical but i
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.
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 a
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
Code
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 bas
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 non-b
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 n
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 prefer your
> redundancy at t
On 1/9/17 8:44 PM, 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.
>
> One more comment I wanted to make about end blocks, is that a
> respectable editor will add th
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
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 hurt?" [2].
[1]: http://wik
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 significant indenting
>
>
>
>
I just noticed a logical inconsistency here:
The Good:
> Syntactically significant indenting
> The Bad:
> Colons at the end of if/while/for blocks.
>
> No end required for if/while/for blocks.
Huh? if you have Syntactically significant indenting, then an "end"
indicator is redun
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 better if it's always
the same
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 notice that you placed a redun
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
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 s
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
https://mail.python.org/ma
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 of past master in such q
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
>> this group to make a pos
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 allows
an object to be
On Mon, Jan 09, 2017 at 07:25:45PM +0800, Simon Lovell wrote:
> The Good:
> Syntactically significant new lines
> Syntactically significant indenting
> Different types of array like structures for different situations
> Mostly simple and clear structures
> Avoiding implicit str
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
On Mon, Jan 9, 2017 at 2:50 PM, Simon Lovell wrote:
> Hmm, Thanks Chris. I thought I was posting this to the correct place.
>
> I've never seen that "for line in open ..." after googling it many times!
> Why is this question so often asked then?
>
The distinction and the explanation of this is th
and
their terminal emulator
uses non-UTF-8 encoding?
As my feeling, UTF-8 start dominating from about 10 years ago, and
ja_JP.EUC_JP (it was most common locale for Japanese befoer UTF-8) is
complete legacy.
There is only one machine (which is in LAN, lives from 10+ years ago,
/usr/bin/python is Python 1
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 otherwise of python.
I thin
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
Syntactical
28 matches
Mail list logo