[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-25 Thread Mark Dickinson

Mark Dickinson added the comment:

New patch: move new test to the correct test class.

--
Added file: http://bugs.python.org/file28103/issue16546_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffb2fa900cb7 by Mark Dickinson in branch '3.3':
Issue #16546: make ast.YieldFrom argument mandatory.
http://hg.python.org/cpython/rev/ffb2fa900cb7

New changeset 9bc6e157475a by Mark Dickinson in branch 'default':
Issue #16546: merge fix from 3.3
http://hg.python.org/cpython/rev/9bc6e157475a

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-25 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +daniel.urban

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Mark Dickinson added the comment:

Brett: can you clarify---in what sense is the argument optional?  I see that 
there's a doc issue at http://docs.python.org/dev/library/ast.html, where it's 
marked as optional but shouldn't but.  Is there something more that's wrong?

If you mean that ast.YieldFrom can be instantiated without an argument, isn't 
that the same for all the ast classes?

 ast.YieldFrom()
_ast.YieldFrom object at 0x100760f50
 ast.BoolOp()
_ast.BoolOp object at 0x100760f90

--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Brett Cannon

Brett Cannon added the comment:

Where is the doc issue? And it's a bit more than just a doc issue anyway as 
Python.asdl has the same issue and that is what is used to generate the code 
that represents the nodes.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Mark Dickinson added the comment:

Ah, okay.  I only looked at Grammar/Grammar, which looks fine.

The doc issue is that at http://docs.python.org/dev/library/ast.html, under the 
heading 31.2.2. Abstract Grammar, it says:

  | Yield(expr? value)
 | YieldFrom(expr? value)

But the docs insert the contents of Python.asdl directly, so you're right: it's 
not really a doc issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file28094/issue16546.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Mark Dickinson added the comment:

New patch that removes some unnecessary braces in the case statements.

--
Added file: http://bugs.python.org/file28095/issue16546.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Removed file: http://bugs.python.org/file28094/issue16546.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-23 Thread Brett Cannon

New submission from Brett Cannon:

The grammar guarantees that 'yield from' statements have an expression to 
evaluate, plus a 'yield from' without an expression makes no sense.

--
components: Library (Lib)
messages: 176261
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: ast.YieldFrom needlessly has its expr value as optional
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com