Re: [Python-Dev] Decorator syntax

2009-09-02 Thread Carl Johnson
Ruby block-esque tricks. OTOH, if you come up with some simple, clear use cases though, and I think he might still be persuadable to make a simple change to the grammar. — Carl Johnson Rob Cliffe wrote: > Hi All, > This is my first post to python-dev so I will briefly introduce myself:

Re: [Python-Dev] return from a generator [was:PEP 380 (yield from a subgenerator) comments]

2009-03-26 Thread Carl Johnson
already have to make your cooperative multitasking mini-thread different from an ordinary function anyway by sprinkling yields throughout it. If you're going that far, is it really so bad to also change the "return" to a "raise ReturnValue"? -- Carl Johnson __

Re: [Python-Dev] PEP 377 - allow __enter__() methods to skip the statement body

2009-03-15 Thread Carl Johnson
P.J. Eby wrote: > Of course, at that point, what's the difference between: > >    with foo() as bar: >        baz > > and... > >   �...@foo >    def bar(): >       baz > > except for being slightly less verbose? (due to missing nonlocal statements, > etc.) That's not quite direct translation. Clo

Re: [Python-Dev] Seeming unintended difference between list comprehensions and generator expressions...

2009-02-22 Thread Carl Johnson
Nick Coghlan wrote: > > Josiah Carlson wrote: > >> Similarly, a 3.x list comprehension [i*i for i in x] is very roughly > >> translated as: > >> > >> def _lc(arg): > >>result = [] > >>for i in arg: > >> result.append(i*i) > >>return result > >> > >> = _lc(x) > > > > I was under

Re: [Python-Dev] Incorrect documentation (and possibly implementation) for rlcompleter.Completer?

2009-01-25 Thread Carl Johnson
On 2009/01/25, at 3:22 pm, Nick Coghlan wrote: It needs to go on the tracker regardless of whether the problem is in the documentation or in the implementation, so file away. Issue #5062: http://bugs.python.org/issue5062 -- Carl Johnson ___ Python

[Python-Dev] Incorrect documentation (and possibly implementation) for rlcompleter.Completer?

2009-01-25 Thread Carl Johnson
27;b.__str__(', u'b.__subclasshook__(', u'b.__class__(', u'b.__class__(', u'b.__delattr__(', u'b.__dict__', u'b.__dir__(', u'b.__doc__', u'b.__format__(', u'b.__getattribute__(', u'b.__hash__(