on = style
bartc
bc at freeuk.com
Mon Oct 9 15:32:42 EDT 2017
On 09/10/2017 07:40, Abdur-Rahmaan Janhangeer wrote:
> hi just a quick question, why is
>
> my_pens = 4
> my_pencils = 5
>
> is preffered to
>
> my_pens = 4
> my_pencils = 5
>
> *referring to = symbol alignment
I will sometimes line things up, if a block of assignments are related:
red = 1
green = 2
blue = 3
There might sometimes be extra maintenance if you then add:
turquoise = 4
and have to readjust the others, or you add:
yellow = 201
and prefer the number should be aligned right-justified:
red = 1
green = 2
blue = 3
turquoise = 4
yellow = 201
but it's not hard. Although it might not be worth doing until a program
is finished. Compare to:
red = 1
green = 2
blue = 3
turquoise = 4
yellow = 201
--
bartc
More information about the Python-list
mailing list