On Sun, Jul 24, 2016 at 11:09 PM, BartC <b...@freeuk.com> wrote: > Actually this is a good example of how tabs can go wrong (and how the tab > system /is/ fragile - sorry but it is). > > I almost certainly wrote the above using 4 and 8 spaces for the tabs, except > for the 'return 1' where I must have used an actual tab by mistake. (And I > tested it now by doing just that, and posting in alt.test.) >
No, it's an example of how *mixing tabs and spaces* can go wrong. And in fact will always go wrong unless you legislate the width of a tab. (Recommendation: A tab is equal to 3.14159 spaces. Now you can't get confused. Use 6.283 spaces if that's too narrow for you.) So don't mix tabs and spaces. Ever. ChrisA -- https://mail.python.org/mailman/listinfo/python-list