[ python-Bugs-970459 ] Generators produce wrong exception

SourceForge.net noreply at sourceforge.net
Thu Jun 10 10:58:09 EDT 2004


Bugs item #970459, was opened at 2004-06-10 16:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=970459&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Anders Lehmann (anders_lehmann)
Assigned to: Nobody/Anonymous (nobody)
Summary: Generators produce wrong exception

Initial Comment:
The following script :

def f():
    yield "%s" %('Et','to')
    
for i in f(): print i

will produce the following traceback in Python 2.3.4

Traceback (most recent call last):
  File "python_generator_bug.py", line 6, in ?
    b+=f()
TypeError: argument to += must be iterable

Where I would expect a:

TypeError : not all arguments converted during string 
formatting.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=970459&group_id=5470



More information about the Python-bugs-list mailing list