Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsreader4.netcologne.de!news.netcologne.de!feeder.news-service.com!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'cpython': 0.05; 'python': 0.08; 'alignment': 0.09; 'hurts': 0.09; 'matters,': 0.09; "module's": 0.09; 'pgp': 0.09; 'reason.': 0.09; 'storing': 0.09; 'message-----': 0.12; 'received:209.85.214.174': 0.13; 'received:mail-iw0-f174.google.com': 0.13; 'wrote:': 0.15; "'',": 0.16; '-----begin': 0.16; '-----end': 0.16; '3.2.1': 0.16; 'docstrings': 0.16; 'gnupg': 0.16; 'hash:': 0.16; 'thunderbird': 0.16; 'url:enigmail': 0.16; 'url:mozdev': 0.16; 'pm,': 0.16; 'comment:': 0.19; 'converted': 0.19; 'convert': 0.19; 'header:In- Reply-To:1': 0.22; 'stuff': 0.22; 'vs.': 0.23; 'skip:[ 10': 0.26; 'windows': 0.26; 'received:209.85.214': 0.28; 'import': 0.29; 'fixed': 0.29; 'id:': 0.29; 'mix': 0.30; 'skip:+ 60': 0.30; 'version': 0.30; 'class': 0.31; "won't": 0.32; 'source': 0.32; 'signed': 0.32; "skip:' 10": 0.32; 'message-id:@gmail.com': 0.32; "i've": 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'however,': 0.34; 'things': 0.34; 'example,': 0.35; 'align': 0.35; '(for': 0.36; 'unless': 0.37; 'doing': 0.37; 'platforms': 0.37; 'but': 0.37; 'using': 0.37; 'received:192': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'received:192.168.1': 0.39; 'files,': 0.39; 'version:': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'sense': 0.40; 'methods': 0.40; 'setup': 0.40; 'leading': 0.61; 'cameron': 0.67; 'spaces': 0.73; 'subject:have': 0.74; '5.0': 0.84; 'me:': 0.84; 'readability': 0.84; 'setup.py,': 0.84; 'skip:d 60': 0.84; 'subject:should': 0.84; 'aligning': 0.93; 'things:': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=1u5pIxuYioS0wIr37yRy5I2MopccuEhP9rurJLfJzf0=; b=YTa256UhYxfPqUgnbnlIgk1jgJxcvXCkStykRzjU116JDzlT3Vlhy1FJAjhG5i51Ds EBioiQRgGqkQcQQ67FqV0nyiXgIAP9VzYFhx8Sn0UHfUVbGDPIe2B2k7Ps2fEw4EVk2t 82a0SMFkPhR7QWhOspdtPjLU0so8MBQFHp4JE= Date: Sat, 16 Jul 2011 19:29:30 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: Tabs -vs- Spaces: Tabs should have won. References: <20110716235245.GA8685@cskk.homeip.net> In-Reply-To: <20110716235245.GA8685@cskk.homeip.net> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 73 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310862590 news.xs4all.nl 23981 [2001:888:2000:d::a6]:60256 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9662 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 On 2011.07.16 06:52 PM, Cameron Simpson wrote: > Only for leading indentation, not following indentation. Consider > docstrings and other stuff with embedded fixed witdh layout. I try to avoid aligning things unless not doing it really hurts readability for that reason. For example, in most of my source files, I use tabs to indent. Since Python won't allow a mix of tabs and spaces (for whitespace) on one line, I don't try to align things: else: self.x264_cmd = [ self.x264_exe, self.avs_file, '--fps', self.fpsr, '--sar', self.sar, '--crf', self.crf, '--level', self.level, '--keyint', self.ki, '--min-keyint', self.minki, '--ref', self.ref, '--weightp', self.weightp, '--bframes', self.bframes, '--b-adapt', self.badapt, '--me', self.me, '--merange', self.merange, '--direct', self.direct, '--trellis', self.trellis, '--subme', self.subme, '--deblock', self.deblock, '--output', self.video_output ] But it's still very readable. However, when alignment really matters, such as in a module's setup.py, spaces are the way to go: from distutils.core import setup setup( name = 'Elucidation', version = '0.0.1-WIP', py_modules = ['elucidation'], author = 'Andrew Berg', author_email = 'bahamut@digital-signal.net', url = '', platforms = 'Windows', description = 'Provides a class for storing information on multimedia files that are to be converted or remuxed and methods to convert and remux using popular tools.' ) Of everything I've read on tabs vs. spaces, this is what makes the most sense to me: http://www.iovene.com/61/ - -- CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0 PGP/GPG Public Key ID: 0xF88E034060A78FCB -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAwAGBQJOIizqAAoJEPiOA0Bgp4/Lz3MH/2intDlRrMNNtfnyJF384/yS +dDptVATyTfFYlEGYhVAc1DZHWC2574ZPlB+rPQd8EnDuawGgFtq0h+5m2oMrWTV dG+53im/TD3t9vU8ElsQ4gdINV99bw2jASJA2zrFwUS7QWAadqHWfZji1JgJkp+k BupqXbBWaKZn9tREDbWNeTp3byHD0WFs6ZZp5ZxRxYCMNl4I4YMWgkSQuRmQJRy+ 3FuFokUz9uyCQk/pHD9JSQqiB2mkXBLZbXU0V71rTBqGIWe+u0n+DggWAAYNAK5R U+neKJAfwHfwNcgCI0r56gNl1fWc5cOXzT7HcPW4cErvgsBXOOGicPoxZTZZ05I= =6w/9 -----END PGP SIGNATURE-----