AWS Thinkbox Discussion Forums

python 4space tabs?

Hi there,

The python scripts of deadline use a “tab as tab” approach, not the usual python standard of “4-spaces as tab”. I know this might be a bit of a major change, but any chance of changing that to a python standard?

The reason being that we have a couple of patches we usually apply to the mayabatch & nuke plugins, and every new release we have to go line by line due to the non standard tabulation.

cheers,
laszlo

Burn the heretic! Actually… it is standard but it’s a bad standard imo. So burn The Monarchy!

I think you need a better reason than that object… I would probably be lobbying for this change as well (and I fully support it), but I’m already pretty deep into writing a set of new plugins that hook into our rendering pipeline.

Hey guys,

We agree that we should adhere to the standards, so we’ll make this change in beta 13.

Thanks!

  • Ryan

It’s easier to go from tabs to spaces than spaces to tabs. Also I hate it when I have 3 spaces instead of 4, it looks like it’s indented but it’s not. Also tab is the “indentation” symbol. Also C++ and C# are tab’ed I believe. Less keystrokes.

Sounds like you need a better editor/IDE… Any good one will be able to interpret a Tab keypress as “promote/demote by N spaces.”

Tabs are terrible because there is no standardization. Any program can interpret a tab in whatever way it wants, and may not even convert them to spaces. I’ve seen different programs convert them to 2, 3, 4, 6, and 8 just on my workstation.

I see that now this is 4 spaces in the full release of 6? But why is it spaces rather than tabs?

I’ve not had this issue in any other software so it took me a while to realise that was the problem with the scripts I had made!

We decided to go with spaces because it is the most “popular” standard:
python.org/dev/peps/pep-0008/#tabs-or-spaces

Cheers,

  • Ryan

Oh, I’m quite surprised (it’s not as though Im a programmer here :slight_smile: )

Anyway good to know thanks! I think upgrading my scripts into 6 is going smoothly…

Privacy | Site terms | Cookie preferences