Docstrings considered too complicated

MRAB python at
Sat Feb 27 01:54:53 CET 2010

Steven D'Aprano wrote:
> On Fri, 26 Feb 2010 09:09:36 -0600, Tim Daneliuk wrote:
>> Reminiscent of:
>> mov  AX,BX               ; Move the contents of BX into AX
> That's a *good* comment, because without it most English-speaking people 
> would assume you were moving the contents of AX into BX.
If you're reading and/or writing at assembly language level then you
should know what it does anyway!

The assembly languages of virtually all the processors that I've come
across put the destination first, eg. x86:

     SUB AX,BX
     MOV AX,BX

which does:

     AX := AX - BX
     AX := BX

and ARM:

     SUB R0,R1,R2
     MOV R0,R1

which does:

     R0 := R1 - R2
     R0 := R1

The only assembly language I know of which does it the other way round
is 68x00:

     SUB D0,D1
     MOVE D0,D1

which does:

     D1 := D1 - D0
     D1 := D0

I know which I prefer! :-)

More information about the Python-list mailing list