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.

Author ned.deily
Recipients asolano, ned.deily
Date 2013-04-09.00:49:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365468593.3.0.74100049937.issue17670@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, the behavior is by design.  I think you are misunderstanding how exandtabs() works.  The "tabsize" argument indicates the number of columns each tab position occupies.  So, with a tabsize of 4, the tab positions occur every four columns; the tab positions are where the characters immediately following the tab character start.  Perhaps this example will make the behavior clearer:

>>> '1\t2'.expandtabs(4)
'1   2'
>>> '12\t3'.expandtabs(4)
'12  3'
>>> '123\t4'.expandtabs(4)
'123 4'
History
Date User Action Args
2013-04-09 00:49:53ned.deilysetrecipients: + ned.deily, asolano
2013-04-09 00:49:53ned.deilysetmessageid: <1365468593.3.0.74100049937.issue17670@psf.upfronthosting.co.za>
2013-04-09 00:49:53ned.deilylinkissue17670 messages
2013-04-09 00:49:52ned.deilycreate