Post Reply 
Python survey 2020
10-30-2020, 02:25 PM (This post was last modified: 10-30-2020 09:07 PM by compsystems.)
Post: #1
Python survey 2020
Hello
What does Python need to be a super language?
If you want you can share your ideas in this forum and in the following survey.

https://surveys.jetbrains.com/s3/c8-pyth...urvey-2020

1: A type of symbolic object for algebraic manipulation CAS
2: ...


There is also a draw with 100 winners (surprise prize) to whoever completes the form
Find all posts by this user
Quote this message in a reply
10-30-2020, 08:36 PM
Post: #2
RE: Python survey 2020
Is it well translated in multiple languages, or did you have to answer in French? Smile
It is a high quality survey.

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
11-01-2020, 05:59 AM
Post: #3
RE: Python survey 2020
I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL or equivalent loop structure where the condition is evaluated at the end of the loop. I don't know that I've ever used a language without such a loop construct. I know you can use a "while True:" and a "break" but that looks so kludgy.

(On the plus side, I don't know that I've seen another language with the while-else construction that Python has. That's kind of cool.)
Find all posts by this user
Quote this message in a reply
11-01-2020, 10:51 AM
Post: #4
RE: Python survey 2020
(11-01-2020 05:59 AM)Wes Loewer Wrote:  I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL ...

Assumed Python do have repeat/until:

repeat:
      ... # some code
      if condition: continue
      bad = 0
      ... # code that might turned "bad"
until bad

if condition is true, it will jump to line "until bad".
However, bad is a local variable, not existed before condition test.
(Or worse, bad existed outside repeat/until loop, and used for until ...)

You could solve it by moving up bad=0 before the condition test.
But, that would be messy to document repeat/until usage.

Static typed language does not have this problem. Code won't compile.
Find all posts by this user
Quote this message in a reply
11-01-2020, 02:25 PM
Post: #5
RE: Python survey 2020
A native BCD decimal data type would be a big step in the right direction. C# handles it very well.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-01-2020, 04:45 PM (This post was last modified: 11-01-2020 04:53 PM by toml_12953.)
Post: #6
RE: Python survey 2020
(11-01-2020 05:59 AM)Wes Loewer Wrote:  I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL or equivalent loop structure where the condition is evaluated at the end of the loop. I don't know that I've ever used a language without such a loop construct. I know you can use a "while True:" and a "break" but that looks so kludgy.

(On the plus side, I don't know that I've seen another language with the while-else construction that Python has. That's kind of cool.)

You can do this:

Code:
while True:
   do something
   do some more
   a += 1
   If a >= 10:
      Break


That's the equivalent of
Code:
DO
   do something
   do some more
   a = a + 1
LOOP WHILE a < 10

I know you think it looks kludgy as did I, coming from a BASIC background, but if you use Python for a while you get used to it. Since Python programmers think in terms of While True, there's no incentive to change it.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)