Ed Leafe wrote:
I can't use different indentation for different Python projects.
Could you perhaps make this an option for autogenerated code?

I'll leave that up to Paul, since he's the primary AppWizard guy, and since he has to start getting that 1:M support added (hint, hint!). If he does add it, tabs would certainly remain the default.

I agree with the sentiment against using different indentation for different Python projects. Whenever I try to help people on wxPython-users or python-list, I have to remember not to press tab in their source code because 99.5% of Python users seem to use spaces instead of tabs.

However, I'm also of the opinion that tabs are superior to spaces, especially in Python where leading whitespace is significant. I'm a recent convert, actually: Dabo started out indenting with spaces but I got tired of hearing Ed whine every day about having to resort to using spaces so I finally relented, but I haven't regretted it. :)

There are certain things I miss about spaces, such as lining up continued lines so it "looks good", and I still definitely prefer spaces in SQL code or it is simply a mess to read, but for the most part tabs are definitely superior, and for Python code there are other ways to get the lining-up using mixed tabs and spaces (emacs does this, and it works, you just need to remember to indent the proper amount with tabs, and then use only spaces for lining things up).

I guess it wouldn't be too hard to have AppWizard convert leading tabs to spaces as one of the final steps when writing out a generated file. I guess we'd also have to allow the user to specify the number of spaces, since some people like 3, others 8, etc.

Is this a worthwhile endeavor? If we do it in AppWizard we'll probably be asked to do it elsewhere too, such as in the class designer, report designer, etc. etc.

--
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to