On Wed, Nov 28, 2012 at 12:39 PM, Kevin T <kevini...@gmail.com> wrote: > with other languages i always expand tabs to spaces. the vi plugin does do this properly. if i change all indents to be spaces only will python behave? i inherited a good deal of the code that i am using, which is tab based.
Yes, it's best to use either tabs-only or spaces-only. Quoting from PEP 8 on the subject: Never mix tabs and spaces. > > The most popular way of indenting Python is with spaces only. The > second-most popular way is with tabs only. Code indented with a mixture of > tabs and spaces should be converted to using spaces exclusively. When > invoking the Python command line interpreter with the -t option, it issues > warnings about code that illegally mixes tabs and spaces. When using -tt > these warnings become errors. These options are highly recommended! > > For new projects, spaces-only are strongly recommended over tabs. Most > editors have features that make this easy to do. > I thought the prohibition against mixing tabs and spaces was made more strict in Python 3, but I can't find any reference to that now. Probably I was mistaken.
-- http://mail.python.org/mailman/listinfo/python-list