[Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

Steven D'Aprano steve at pearwood.info
Wed Jul 4 07:35:40 EDT 2018


On Wed, Jul 04, 2018 at 03:21:29PM +0400, Abdur-Rahmaan Janhangeer wrote:
> was going to tell
> 
> instead of := maybe => better
> 
> := too close to other langs

The fact that := will be familiar to many people (especially if they 
know Go, Pascal or Eiffel etc) is a point in its favour.

https://en.wikipedia.org/wiki/Assignment_%28computer_science%29#Notation

The => arrow puts the arguments around the "wrong" way compared to 
regular assignment:

    name = expression
    expression => name

Although personally I like that order, many people did not and I think 
Guido ruled it out very early in the discussion.

Also it may be too easily confused with <= or >= or the -> syntax from 
annotations.



-- 
Steve


More information about the Python-Dev mailing list