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)
title: RawConfigParser.items() is unusual in taking arguments
versions: Python 3.7
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list