Why do some attributes start with '@' while others done't?
Chris Wright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 22 18:16:43 PST 2016
On Fri, 22 Jan 2016 15:00:11 -0800, H. S. Teoh via Digitalmars-d wrote:
> On Fri, Jan 22, 2016 at 10:11:45PM +0000, Ola Fosheim Grøstad via
> Digitalmars-d wrote:
>> On Friday, 22 January 2016 at 19:10:38 UTC, H. S. Teoh wrote:
>> >I work with Python code without an IDE, and I manage just fine. As
>> >long as you're consistent with how you use tabs vs. spaces, it's not a
>> >problem.
>>
>> Yes, if you use the same editor and reformat source files you download
>> before editing them. I have found it to be more convenient to use an
>> editor that auto detects common mistakes (not unique for Python
>> though).
>
> Why do you need to reformat source files you download? Just follow the
> formatting conventions of the surrounding code and you'll save yourself
> a whole lot of headache.
Because my text editor is set up with particular indentation settings and
isn't good at autodetecting what's in use. Since this is a partially
invisible aspect of formatting, it's safer to reformat files when I
download them.
I mean, sure, I can check manually when I start editing the file. And
then I close the file for a moment to go back to the command line because
I forgot to use tmux, and then I go back to the file, and since it's been
half an hour I forgot about tabs versus spaces and now I'm introducing
indentation errors again.
Reformatting aggressively solves this problem.
More information about the Digitalmars-d
mailing list