[issue21910] File protocol should document if writelines must handle generators sensibly

2016-03-08 Thread Dan Haffey

Dan Haffey added the comment:

+1, I just lost an hour-plus compute job to this. It sure violates POLA. I've 
been passing large generators to file.writelines since about as long as 
generators have existed, so I never would have guessed that a class named 
"StreamWriter" of all things wouldn't, you know, stream its writelines argument.

--
nosy: +dhaffey

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



[issue24580] Wrong or missing exception when compiling regexes with recursive named backreferences

2015-07-06 Thread Dan Haffey

New submission from Dan Haffey:

Error reporting for recursive backreferences in regexes isn't consistent across 
both types of backref. Here's the exception for a recursive numeric backref:

>>> import re
>>> re.compile(r'(\1)')
Traceback (most recent call last):
...
sre_constants.error: cannot refer to an open group at position 1

Here's what I'm seeing on the 3.5 branch for a named backref:

>>> re.compile(r'(?P(?P=spam))')
Traceback (most recent call last):
...
RecursionError: maximum recursion depth exceeded

Which is an improvement over 3.4 and below, where compilation succeeds and 
appears to treat (?P=spam) as valid but unmatchable.

--
components: Regular Expressions
messages: 246390
nosy: dhaffey, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Wrong or missing exception when compiling regexes with recursive named 
backreferences
type: behavior

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



[issue6803] Context manager docs refer to contextlib.contextmanager as contextlib.contextfactory

2009-08-29 Thread Dan Haffey

New submission from Dan Haffey :

The documentation at
http://docs.python.org/library/stdtypes.html#context-manager-types
refers to the contextlib.contextmanager decorator as
contextlib.contextfactory.

--
assignee: georg.brandl
components: Documentation
files: doc-stdtypes-contextmanagement.patch
keywords: patch
messages: 92068
nosy: dhaffey, georg.brandl
severity: normal
status: open
title: Context manager docs refer to contextlib.contextmanager as 
contextlib.contextfactory
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0, Python 3.1
Added file: 
http://bugs.python.org/file14802/doc-stdtypes-contextmanagement.patch

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