[Python] WHY is there a TabError in Python?

Discussão em 'Python' iniciado por Stack, Março 8, 2025.

  1. Stack

    Stack Membro Participativo

    I'm not asking WHAT is TabError nor HOW to fix TabError, I'm asking WHY.

    I completely understand a TabError means inconsistent use of tabs and spaces in indentation exactly as it prints. I mean, the Python Interpreter should be able to just simply convert each Tab to 4 spaces.

    Is there any ambiguous situation that makes TabError sense?

    The only one I can see is that, some may use 2 or other number of spaces as an indentation. But since Python accepts it, it knows it and is able to convert Tab to it.

    Continue reading...

Compartilhe esta Página