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
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
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?
Re:Indentation making end block markers not needed; well yes they aren't
/needed/. However, they are usefu
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
On Jan 06, 2017, at 11:08 PM, Steve Dower wrote:
>Passing universal_newlines will use whatever locale.getdefaultencoding()
There is no locale.getdefaultencoding(); I think you mean
locale.getpreferredencoding(False). (See the "Changed in version 3.3" note in
$17.5.1.1 of the stdlib docs.)
>univ
INADA Naoki writes:
> But when I see non UTF-8 text, I don't change locale to read such
> text.
Nobody does.
The problem is if people have locales set for non-UTF-8, which Chinese
people often do ("GB18030 isn't just a good idea, it's the law").
Especially forcing stdout to something other tha
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
Hi Stephen,
2017-01-09 19:42 GMT+01:00 Stephen J. Turnbull <
[email protected]>:
>
> Private sector may be up to date, but academic sector
> (and from the state of e-stat.go.jp, government in general, I suspect)
> is stuck in the Jomon era.
>
I went to that page, checked the HTM
>
> The problem is if people have locales set for non-UTF-8, which Chinese
> people often do ("GB18030 isn't just a good idea, it's the law").
> Especially forcing stdout to something other than the locale is likely
> to mess things up.
Oh, I didn't know non-UTF-8 is used for LC_CTYPE in these yea
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
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 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 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 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
[email protected]
https://mail.python.org/ma
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
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
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
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
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
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
>
>
>
>
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
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 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
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 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
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
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
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
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code
28 matches
Mail list logo