[issue33224] "RuntimeError: generator raised StopIteration" in difflib.mdiff

2018-04-04 Thread Jeff Kaufman

New submission from Jeff Kaufman :

With python built at HEAD (c51d8c9b) and at 3.7b3 (fcd4e03e08) the code:

import difflib
for fromdata, todata, flag in difflib._mdiff(
["2"], ["3"], 1):
  pass

produces:

Traceback (most recent call last):
  File "/home/jefftk/cpython/Lib/difflib.py", line 1638, in _mdiff
from_line, to_line, found_diff = next(line_pair_iterator)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jefftk/icdiff/repro.py", line 3, in 
["2"], ["3"], 1):
RuntimeError: generator raised StopIteration

In python 3.5 and 3.6 I don't get an error.

This is probably due to https://bugs.python.org/issue32670 which implements PEP 
479, but I this this isn't supposed to happen in library code?

--
components: Library (Lib)
messages: 314936
nosy: Jeff.Kaufman
priority: normal
severity: normal
status: open
title: "RuntimeError: generator raised StopIteration" in difflib.mdiff
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue33224>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5412] extend configparser to support [] syntax

2009-03-03 Thread Jeff Kaufman

New submission from Jeff Kaufman :

This is a patch against the configparser in the cvs version of 3.1 to
support [] notation:

>>> import configparser_patched
>>> config = configparser_patched.SafeConfigParser()
>>> config.add_section("spam")
>>> config["spam", "eggs"] = "yummy"
>>> config["spam", "eggs"]
'yummy'
>>> del config["spam", "eggs"]
>>> 

The functions are just syntactic sugar for the simple forms of "get",
"set", and "remove_option".

--
components: Library (Lib)
files: configparser.patch
keywords: patch
messages: 83075
nosy: jkaufman
severity: normal
status: open
title: extend configparser to support [] syntax
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13234/configparser.patch

___
Python tracker 
<http://bugs.python.org/issue5412>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2292] Missing *-unpacking generalizations

2013-04-05 Thread Jeff Kaufman

Jeff Kaufman added the comment:

What would it take to get this moving again?

--
nosy: +Jeff.Kaufman

___
Python tracker 
<http://bugs.python.org/issue2292>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com