Transitioning away from PEP8

Skip to first unread message

Aidan Gomez

Jul 3, 2018, 3:14:35 AM7/3/18
to cleverhans dev
Hello all,

I just wanted to know what you thought about moving away from the PEP8 standard and moving towards something a little less strict and more familiar to TensorFlow/PyTorch people?

My favourite is the Google python style guide: and there are loads of auto-formatters we can get people to use. Since we're under tensorflow/ these days it also makes sense to match their formatting which is the Google style.

Let me know if this is something we could support and I can make the changes necessary :)


Ian Goodfellow

Jul 3, 2018, 12:44:21 PM7/3/18
to, cleverhans dev
The TensorFlow style guide ( ) is actually "follow PEP8 Python style guide, except for using 2 spaces".

Are there other things you'd like to change apart from the number of spaces?

You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Aidan Gomez

Jul 3, 2018, 12:51:58 PM7/3/18
to Ian Goodfellow, cleverhans dev
Maybe I didn’t mean move away from PEP8, and instead meant use Google/Tensorflow documentation style: and use two spaces instead of four.

That’s what I meant by the something more familiar to Tensorflow and PyTorch users. Although PyTorch uses four spaces… which I’m personally really not a fan of. It seems completely vacuous that less line continuations is a better thing, not to mention the visual ambiguity of line continuations from real indentation (see:


Nicolas Papernot

Jul 3, 2018, 1:04:09 PM7/3/18
to Aidan Gomez, Ian Goodfellow, cleverhans dev
Transitioning to 2 spaces instead of 4 would be reasonable to be consistent with the overall TensorFlow style guide and code ecosystem.

Reply all
Reply to author
0 new messages