From andreas.roehler at online.de Fri Jun 14 14:18:45 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Fri, 14 Jun 2013 14:18:45 +0200 Subject: [Python-mode] pylint, which file Message-ID: <51BB0A25.3030103@online.de> Hi Barry, hi all, when running pylint from python-mode, was quite often at another file than at check before. Whilst the file offered by Emacs for check was the previous one. r1260 introduced new boolean `py-pylint-offer-current-p', default is non-nil. If current buffers file should be offered for check. Otherwise `py-pylint-run' looks up filename from history As this changes the API, maybe have a look. Switching `py-pylint-offer-current-p' restores old behavior. Cheers, Andreas From andreas.roehler at online.de Fri Jun 14 22:24:49 2013 From: andreas.roehler at online.de (=?ISO-8859-15?Q?Andreas_R=F6hler?=) Date: Fri, 14 Jun 2013 22:24:49 +0200 Subject: [Python-mode] Bug? Message-ID: <51BB7C11.2080004@online.de> Is this a bug? http://stackoverflow.com/questions/17114573/python-mode-el-not-allowing-indentation-after-if-statement/17116654#17116654 From barry at python.org Fri Jun 14 22:30:16 2013 From: barry at python.org (Barry Warsaw) Date: Fri, 14 Jun 2013 16:30:16 -0400 Subject: [Python-mode] Bug? In-Reply-To: <51BB7C11.2080004@online.de> References: <51BB7C11.2080004@online.de> Message-ID: <20130614163016.4900d1c6@anarchist> On Jun 14, 2013, at 10:24 PM, Andreas R?hler wrote: >Is this a bug? > >http://stackoverflow.com/questions/17114573/python-mode-el-not-allowing-indentation-after-if-statement/17116654#17116654 It's bad form to use parentheses in this situation, but it *is* legal. It doesn't bother me if python-mode passive/aggressively discourage such bad form, but others might disagree. OTOH, this, which is perfectly fine form, seems to work well: def foo(): if (foo && baz): bar() (i.e. parens used to span multiple lines.) -Barry From freyes at tty.cl Fri Jun 14 23:04:36 2013 From: freyes at tty.cl (Felipe Reyes) Date: Fri, 14 Jun 2013 17:04:36 -0400 Subject: [Python-mode] Bug? In-Reply-To: <20130614163016.4900d1c6@anarchist> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> Message-ID: <20130614210435.GB13769@tauntaun.corp.physware.com> Hi All, On Fri, Jun 14, 2013 at 04:30:16PM -0400, Barry Warsaw wrote: > It's bad form to use parentheses in this situation, but it *is* legal. It > doesn't bother me if python-mode passive/aggressively discourage such bad > form, but others might disagree. OTOH, this, which is perfectly fine form, > seems to work well: > > def foo(): > if (foo && > baz): > bar() > > (i.e. parens used to span multiple lines.) This example raises a pep8 warning[0], I've been dealing with it and manually adding another indentation level to not leave 'baz' aligned with 'baz()' def foo(): if (foo && baz): bar() Can this be considered a bug? Best Regards, [0] E125 continuation line does not distinguish itself from next logical line -- Felipe Reyes Software Engineer http://tty.cl -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: From barry at python.org Fri Jun 14 23:20:50 2013 From: barry at python.org (Barry Warsaw) Date: Fri, 14 Jun 2013 17:20:50 -0400 Subject: [Python-mode] Bug? In-Reply-To: <20130614210435.GB13769@tauntaun.corp.physware.com> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> <20130614210435.GB13769@tauntaun.corp.physware.com> Message-ID: <20130614172050.0939ffed@anarchist> On Jun 14, 2013, at 05:04 PM, Felipe Reyes wrote: >Hi All, > >On Fri, Jun 14, 2013 at 04:30:16PM -0400, Barry Warsaw wrote: >> It's bad form to use parentheses in this situation, but it *is* legal. It >> doesn't bother me if python-mode passive/aggressively discourage such bad >> form, but others might disagree. OTOH, this, which is perfectly fine form, >> seems to work well: >> >> def foo(): >> if (foo && >> baz): >> bar() >> >> (i.e. parens used to span multiple lines.) > >This example raises a pep8 warning[0], Note that PEP 8 doesn't really recommend against this. There's even an example in the Maximum Line Length section that has this very "problem". It's also true that there's no single convention or recommendation for dealing with this. >I've been dealing with it and manually >adding another indentation level to not leave 'baz' aligned with 'baz()' > >def foo(): > if (foo && > baz): > bar() > >Can this be considered a bug? I think python-mode should be able to handle it, but it needs to be configurable. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From andreas.roehler at online.de Sat Jun 15 07:42:04 2013 From: andreas.roehler at online.de (=?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?=) Date: Sat, 15 Jun 2013 07:42:04 +0200 Subject: [Python-mode] Bug? In-Reply-To: <20130614163016.4900d1c6@anarchist> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> Message-ID: <51BBFEAC.2080105@online.de> Am 14.06.2013 22:30, schrieb Barry Warsaw: > On Jun 14, 2013, at 10:24 PM, Andreas R?hler wrote: > >> Is this a bug? >> >> http://stackoverflow.com/questions/17114573/python-mode-el-not-allowing-indentation-after-if-statement/17116654#17116654 > > It's bad form to use parentheses in this situation, but it *is* legal. It > doesn't bother me if python-mode passive/aggressively discourage such bad > form, but others might disagree. OTOH, this, which is perfectly fine form, > seems to work well: > > def foo(): > if (foo && > baz): > bar() > > (i.e. parens used to span multiple lines.) > > -Barry > _______________________________________________ Thanks, Barry. So I'll fix that. Andreas From andreas.roehler at online.de Sat Jun 15 09:04:14 2013 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Sat, 15 Jun 2013 09:04:14 +0200 Subject: [Python-mode] Bug? In-Reply-To: <20130614172050.0939ffed@anarchist> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> <20130614210435.GB13769@tauntaun.corp.physware.com> <20130614172050.0939ffed@anarchist> Message-ID: <51BC11EE.2010804@online.de> Am 14.06.2013 23:20, schrieb Barry Warsaw: > On Jun 14, 2013, at 05:04 PM, Felipe Reyes wrote: [ ... ] >> I've been dealing with it and manually >> adding another indentation level to not leave 'baz' aligned with 'baz()' >> >> def foo(): >> if (foo && >> baz): >> bar() >> >> Can this be considered a bug? > > I think python-mode should be able to handle it, but it needs to be > configurable. > > -Barry It's here now: https://bugs.launchpad.net/python-mode/+bug/1191225 From freyes at tty.cl Mon Jun 17 16:04:26 2013 From: freyes at tty.cl (Felipe Reyes) Date: Mon, 17 Jun 2013 10:04:26 -0400 Subject: [Python-mode] Bug? In-Reply-To: <51BC11EE.2010804@online.de> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> <20130614210435.GB13769@tauntaun.corp.physware.com> <20130614172050.0939ffed@anarchist> <51BC11EE.2010804@online.de> Message-ID: <20130617140426.GA7722@tauntaun.corp.physware.com> Cool, thanks Andres. On Sat, Jun 15, 2013 at 09:04:14AM +0200, Andreas R?hler wrote: > Am 14.06.2013 23:20, schrieb Barry Warsaw: > >On Jun 14, 2013, at 05:04 PM, Felipe Reyes wrote: > [ ... ] > >>I've been dealing with it and manually > >>adding another indentation level to not leave 'baz' aligned with 'baz()' > >> > >>def foo(): > >> if (foo && > >> baz): > >> bar() > >> > >>Can this be considered a bug? > > > >I think python-mode should be able to handle it, but it needs to be > >configurable. > > > >-Barry > > > It's here now: > > https://bugs.launchpad.net/python-mode/+bug/1191225 > -- Felipe Reyes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: From andreas.roehler at online.de Mon Jun 17 17:39:21 2013 From: andreas.roehler at online.de (=?ISO-8859-1?Q?Andreas_R=F6hler?=) Date: Mon, 17 Jun 2013 17:39:21 +0200 Subject: [Python-mode] Bug? In-Reply-To: <20130617140426.GA7722@tauntaun.corp.physware.com> References: <51BB7C11.2080004@online.de> <20130614163016.4900d1c6@anarchist> <20130614210435.GB13769@tauntaun.corp.physware.com> <20130614172050.0939ffed@anarchist> <51BC11EE.2010804@online.de> <20130617140426.GA7722@tauntaun.corp.physware.com> Message-ID: <51BF2DA9.9050203@online.de> Am 17.06.2013 16:04, schrieb Felipe Reyes: > Cool, thanks Andres. > On Sat, Jun 15, 2013 at 09:04:14AM +0200, Andreas R?hler wrote: >> Am 14.06.2013 23:20, schrieb Barry Warsaw: >>> On Jun 14, 2013, at 05:04 PM, Felipe Reyes wrote: >> [ ... ] >>>> I've been dealing with it and manually >>>> adding another indentation level to not leave 'baz' aligned with 'baz()' >>>> >>>> def foo(): >>>> if (foo && >>>> baz): >>>> bar() >>>> >>>> Can this be considered a bug? >>> >>> I think python-mode should be able to handle it, but it needs to be >>> configurable. >>> >>> -Barry >> >> >> It's here now: >> >> https://bugs.launchpad.net/python-mode/+bug/1191225 >> > Checked in Cheers, Andreas