PEP8 and 4 spaces

Toby Shepard tshepard at rcsreg.com
Thu Jul 3 20:02:04 CEST 2014


On 07/03/2014 10:46 AM, Tim Chase wrote:
>> Any evidence out there that this part of PEP8 is becoming
>> more optional or even obsolete, as I've heard others
>> say about the 80 char line length?
>>
>> Just need ammo for when the hammer of code
>> unification comes down.
>
> I'm not sure you'll get a whole lot of "PEP8 is optional or
> obsolete", though some may protest the 80-char suggestion.
>
> While I prefer tabs for similar reasons you present (I can set them
> to display at whatever width is comfortable), I have Vim configured
> to expand tabs into spaces so that my code conforms to standards.
>
> If you're really picky about it, just create hooks in your VCS (you
> ARE using revision control, right?) that turn
> $STANDARD_NUMBER_OF_SPACES into a tabs at checkout, and then revert
> tabs back to that number of spaces pre-commit.  For git, this SO
> post covers it:
>
> http://stackoverflow.com/questions/2316677/can-git-automatically-switch-between-spaces-and-tabs
>

Very interesting.  Yes, we're using Git.  Thanks for the suggestion.

Tobiah




More information about the Python-list mailing list