Python Forum
Where to suggest python syntax change ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where to suggest python syntax change ?
#1
I have 3 things i'd like to post as a suggestion to python development team but have no idea where to find them or how to contact them.

Use + strictly for math operation
Use & strictly to COMBINE what ever you have.

For example:
5+5=10 math operator
5&5=55 combine operator
5+"string" = error
5&"string" = "5string"

Escape character.
"string \n continues" is a horrible way to break the string.
"string " & @LF & "continues" is allot better. It makes allot of visual sense.
It eliminates problems with typing paths such as "C:\Windows\network drive" OMG i just escaped the line ?
Fixing these accidental escape characters is a nightmare. You might as well get rid of them all and replace then with @NL new line or something else and utilize the above proposed COMBINE operator to join them as in: "line 1" & @NL & "line 2" etc
This method makes allot more sense to use then to use escape characters that can sometimes get you in allot of trouble.
Its easier to use & @NL & then to split the path into chunks and put it back together to avoid errors.

Also
Some imported libraries have internal function names that user may call with a function name.
If i have a code that uses a variable name that for what ever reason matching this function name, my code will be screwed unless i rename either function i am calling or all of my variable names that match.
For example:
variable named "printresult"
Imported library has function named "printresult"
Suddenly, when someone is looking at the code, he gets confused without even realizing that "printresult" is a function name inside imported module.

If there was a very simple way to visually differentiate variables from the rest of the code, code learning and code understanding would be a day/night difference.

So my question about variable naming is: Why cant we use $ symbol for variables ?
$printresult vs printresult are two VERY DIFFERENT words in my opinion and it will be allot easier for IDE to identify which one is which and give it a color of choice.

To this day, i have yet seen IDE that can tell variable from a object, class or a function.
All colored the same.
I do understand that you recognize them by how they are placed and where they are used, but my point is that: differentiating them visually will make learning python as well as reading and understanding the code allot easier.

Have a look at AutoIT script. Its super easy to understand whats going on because everything has very unique color identification.
Reply


Messages In This Thread
Where to suggest python syntax change ? - by tonycstech - Nov-18-2019, 12:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Please suggest a good Data Science Book alexwazan 3 2,854 Sep-16-2019, 08:05 AM
Last Post: EleenaGates
  Can anyone suggest alternatives to opencv for Python Images readout Spandora 3 3,274 Mar-29-2019, 08:39 PM
Last Post: Spandora
  suggest specific tutorial SchroedingersLion 11 6,399 Oct-11-2018, 09:10 AM
Last Post: Micmilli2

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020