Entering a very large number
Thomas Jollans
tjol at tjol.eu
Fri Mar 23 09:11:41 EDT 2018
On 2018-03-23 14:01, ast wrote:
> Le 23/03/2018 à 13:43, Rustom Mody a écrit :
>> On Friday, March 23, 2018 at 5:46:56 PM UTC+5:30, ast wrote:
>>> Hi
>>>
>>> I found this way to put a large number in
>>> a variable.
>>
>> What stops you from entering the number on one single (v long) line?
>
>
> It is not beautiful and not very readable. It is better to
> have a fixed number of digits per line (eg 50)
>
> import this
>
> Beautiful is better than ugly.
> Readability counts.
I would tend to read this as a reason not to have extremely large
numbers in your code in the first place if you can avoid it.
>
>
>>
>> In case there is a religious commitment to PEP 8 dicta, the recommended
>> meditation is this line (also from PEP8):
>>
>> "However, know when to be inconsistent -- sometimes style guide
>> recommendations just aren't applicable"
>>
>
> Yes I am using pylint which flags too long lines (80 characters)
More information about the Python-list
mailing list