[Python-ideas] Python Reviewed
Rob Cliffe
rob.cliffe at btinternet.com
Tue Jan 10 07:06:29 EST 2017
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.
>
>
> I would say that None should also be non-boolean. Otherwise you are
> saying that things which might be None would be True if not None.
>
>
> Re: SQLAlchemy, this does not resolve the issues satisfactorily to me.
>
>
> Re: half-loop. The idea that you have the same code before entry and
> at the end of the loop is really ugly and raises the potential for
> errors. I can remember doing something similarly ugly with this for
> looping through a cursor but I can't recall why I couldn't just do a
> .fetchall() and then loop through the results. Maybe I ultimately
> changed it to do precisely that. Perhaps you have too big a data set
> to load into memory all at once though and can't do it that way.
> Anyway, the SQL processing is all too difficult in Python and Java and
> nearly all modern languages.
>
>
> Re: Conditional expression. You could have: "<result> = if <condition>
> then <true-value> else <false value". Reading the actual syntax I find
> requires more concentration than it should. However, this means
> another keyword*.
>
> * 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.
That last sentence is a ridiculous (and insulting) statement.
Adding a keyword to Python means that all Python code ever written
potentially becomes incompatible with the next Python release (if it
might use that keyword as an identifier).
So the bar for adding a *new* keyword is necessarily very high.
> I don't find this particularly logical but it is what it is and it
> also isn't going to change. That seems also to explain the else
> keyword at the end of the while loop.
>
>
> Anyway, I think this discussion has reached its natural conclusion here.
Rob Cliffe
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
More information about the Python-ideas
mailing list