[New-bugs-announce] [issue31129] RawConfigParser.items() is unusual in taking arguments
Daniel Watkins
report at bugs.python.org
Sun Aug 6 23:28:30 EDT 2017
New submission from Daniel Watkins:
A grep through the codebase shows that RawConfigParser.items() is the only .items() method in the stdlib which accepts arguments.
This is annoying as a stdlib user because when I see the arguments being passed to RawConfigParser.items(), I have _no idea_ what they do. Instinctively, I do not expect .items() to take arguments, and I have to go and work out what it does each time.
I think it would be both easier to understand, and more consistent with general Pythonic practice, if the two codepaths in RawConfigParser.items() were split in to separate methods; one which takes no arguments (which will continue to behave as it does today when called that way) and one which is named in a way that makes it clearer what it does (and takes arguments).
----------
components: Library (Lib)
messages: 299821
nosy: odd_bloke
priority: normal
severity: normal
status: open
title: RawConfigParser.items() is unusual in taking arguments
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31129>
_______________________________________
More information about the New-bugs-announce
mailing list