This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: '\t' (tab) support
Type: behavior Stage: resolved
Components: Parser Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Pooia, eric.smith, erlendaasland, lys.nikolaou, pablogsal, steven.daprano
Priority: normal Keywords:

Created on 2021-08-03 08:25 by Pooia, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (9)
msg398815 - (view) Author: Pooia (Pooia) Date: 2021-08-03 08:25
Python can't use '\t' character. if I want fix it I will work a long time but a shorter fashion is replacing '\t' character with 4 space (by first clause of pep: 8)
msg398816 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2021-08-03 10:10
I don't understand what you mean by "Python can't use '\t' character." Can you demonstrate an example? It works for me.
msg398904 - (view) Author: Pooia (Pooia) Date: 2021-08-04 15:25
unexcpeted indent

On Tue, Aug 3, 2021 at 7:59 PM Serhiy Storchaka <report@bugs.python.org>
wrote:

>
> Change by Serhiy Storchaka <storchaka+cpython@gmail.com>:
>
>
> ----------
> status: open -> pending
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue44818>
> _______________________________________
>
msg398917 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-08-04 17:41
Please show us an example that demonstrates your problem. Show us the code you tried, what you expected to happen, and what actually happened. Otherwise we can’t help you.
msg398957 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2021-08-04 22:16
On Wed, Aug 04, 2021 at 03:25:06PM +0000, Pooia wrote:
> unexcpeted indent

What about an unexpected indent?

Please explain what you think the bug is in full sentences, showing some 
example code we can run.
msg398958 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-08-04 22:25
I'm guessing this has to do with mixing spaces and tabs when indenting code. This can be fixed in your text editor.
msg398987 - (view) Author: Pooia (Pooia) Date: 2021-08-05 10:30
Got it, thanks!
Erlend E. Aasland:
> I'm guessing this has to do with mixing spaces and tabs when indenting
code. This can be fixed in your text editor

precisely! It's the problem.
Thank you I guess Python can't support tab but it sounds Gnu nano mix
spaces and tabs!

On Thu, Aug 5, 2021 at 2:56 AM Erlend E. Aasland <report@bugs.python.org>
wrote:

>
> Erlend E. Aasland <erlend.aasland@innova.no> added the comment:
>
> I'm guessing this has to do with mixing spaces and tabs when indenting
> code. This can be fixed in your text editor.
>
> ----------
> nosy: +erlendaasland
> status: open -> pending
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue44818>
> _______________________________________
>
msg398988 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-08-05 10:43
> I guess Python can't support tab

AFAIK, it was a deliberate decision during the Python 2 => Python 3 transition.

> [...] it sounds Gnu nano mix spaces and tabs!

You can set up GNU nano to expand tabs:

$ echo "set tabstospaces" >> ~/.nanorc
msg399020 - (view) Author: Pooia (Pooia) Date: 2021-08-05 17:55
Awesome, thanks!

On Thu, Aug 5, 2021 at 3:14 PM Erlend E. Aasland <report@bugs.python.org>
wrote:

>
> Erlend E. Aasland <erlend.aasland@innova.no> added the comment:
>
> > I guess Python can't support tab
>
> AFAIK, it was a deliberate decision during the Python 2 => Python 3
> transition.
>
> > [...] it sounds Gnu nano mix spaces and tabs!
>
> You can set up GNU nano to expand tabs:
>
> $ echo "set tabstospaces" >> ~/.nanorc
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue44818>
> _______________________________________
>
History
Date User Action Args
2022-04-11 14:59:48adminsetgithub: 88981
2021-08-05 17:55:31Pooiasetmessages: + msg399020
2021-08-05 10:43:47erlendaaslandsetmessages: + msg398988
2021-08-05 10:32:02erlendaaslandsetstatus: open -> closed
resolution: not a bug
stage: resolved
2021-08-05 10:30:52Pooiasetstatus: pending -> open

messages: + msg398987
2021-08-04 22:25:43erlendaaslandsetstatus: open -> pending
nosy: + erlendaasland
messages: + msg398958

2021-08-04 22:16:21steven.dapranosetmessages: + msg398957
2021-08-04 17:41:09eric.smithsetnosy: + eric.smith
messages: + msg398917
2021-08-04 15:25:06Pooiasetstatus: pending -> open

messages: + msg398904
2021-08-03 15:29:09serhiy.storchakasetstatus: open -> pending
2021-08-03 10:10:06steven.dapranosetnosy: + steven.daprano
messages: + msg398816
2021-08-03 08:25:05Pooiacreate