[Python-Dev] Multiline with statement line continuation

2014-08-11 Thread Allen Li
This is a problem I sometimes run into when working with a lot of files simultaneously, where I need three or more `with` statements: with open('foo') as foo: with open('bar') as bar: with open('baz') as baz: pass Thankfully, support for multiple items was

Re: [Python-Dev] sum(...) limitation

2014-08-01 Thread Allen Li
On Fri, Aug 01, 2014 at 02:51:54PM -0700, Guido van Rossum wrote: > No. We just can't put all possible use cases in the docstring. :-) > > > On Fri, Aug 1, 2014 at 2:48 PM, Andrea Griffini wrote: > > help(sum) tells clearly that it should be used to sum numbers and not > strings, and wi

Re: [Python-Dev] pep8 reasoning

2014-04-24 Thread Allen Li
On Thu, Apr 24, 2014 at 11:36:03AM -0500, Tim Peters wrote: > There's been a bit of serious study on this. The results are still > open to interpretation, though ;-) Here's a nice summary: > > http://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/ To summarize

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Allen Li
the near future. I don't see anything else worthy of discussion on this topic. Allen Li On Mon, Mar 10, 2014 at 10:35:29PM +, Mark Lawrence wrote: > On 10/03/2014 22:28, Greg Ewing wrote: > >Chris Angelico wrote: > >>Terrible idea. Would wreak havoc with comparisons. No.

Re: [Python-Dev] One-line abstractmethod function?

2013-12-09 Thread Allen Li
I just wanted to sum up this thread of discussion. Proposal: A function in abc to provide a default abstract method implementation. foo = make_abstractmethod('foo', ['self']) is the same as @abc.abstractmethod def foo(self): pass Details: Default behavior, if implemented, should probably b

Re: [Python-Dev] One-line abstractmethod function?

2013-12-05 Thread Allen Li
On Thu, Dec 05, 2013 at 01:33:00PM -0800, Guido van Rossum wrote: > > The only two alternatives are doing nothing/pass/return > > None or having actual code in the method. > > > > The former is only useful to silently ignore blind super() calling, the > > latter you would define and decorate the me

Re: [Python-Dev] One-line abstractmethod function?

2013-12-05 Thread Allen Li
On Thu, Dec 05, 2013 at 10:24:11AM -0800, Guido van Rossum wrote: > How would you get the docstrings in? It seems cramming that much on a > single line doesn't help readability (even though I agree there is a > fair amount of boilerplace). I was basing my initial suggestion somewhat on collections

[Python-Dev] One-line abstractmethod function?

2013-12-05 Thread Allen Li
lot more compact for many use cases, but I welcome any criticisms against this idea. Allen Li ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com