Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PEP8 - 80 Characters - Big Integers

This is somehow related to question about big strings and PEP8.

How can I make my script that has the following line PEP8 compliant ("Maximum Line Length" rule)?

pub_key = {
   'e': 3226833362680126101036263622033066816222202666130162062116461326212012222403311326222666622610430466620224662364142L,
   'n': 226421003861041248462826226103022608220328242204422684232640331238220232226321616266146243302342688266846281802662666622213868114632268211186223606846623310006662260110460620201618186828411322260686632603226636226662262862212140221422102106336342228236361106240226122644614266186283436228208626640846820224661642086022346422443282224682686612228404266842316822624342226666622264826123822122031361242246432886612624262663222232331438863220022020826266366016100422L
}
like image 882
parxier Avatar asked Jan 12 '10 00:01

parxier


2 Answers

'e': 3226833362680126101036263622033066816222202666130162062116461326212012L \
     * 10**45 \
     + 222403311326222666622610430466620224662364142L

I in no way endorse this.

like image 98
danben Avatar answered Oct 17 '22 00:10

danben


But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment.

source

In this case, I would just leave the big integers as is.

like image 45
GmonC Avatar answered Oct 17 '22 01:10

GmonC