Madison May added the comment:
Any chance this issue could be reopened? I ran across this bit of code today
when working on coverage for argparse. I'd like to again propose the removal
or modification of _get_args. I understand that it's there primarily to be
overridden, but even that's
Petri Lehtinen pe...@digip.org added the comment:
Nobody's really sure whether it's safe to remove, so let it be there. Leaving
it can be justified by symmetry with _get_kwargs. Closing.
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
Éric Araujo mer...@netwok.org added the comment:
Hm, I was about to commit this and did a double-take. Are we 100% sure that
nobody in the whole wide world of Python does not override this function?
Shouldn’t we first send a DeprecationWarning in 3.3 and remove later?
--
Steven Bethard steven.beth...@gmail.com added the comment:
It's undocumented, and it begins with an underscore, but it would certainly be
safer to deprecate it first.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14075
Geoffrey Spear geoffsp...@gmail.com added the comment:
If people do override this provate method, would they really bother calling
super() to get the essentially no-op functionality of the superclass method?
FWIW, Google Code and github both seem to be free of any such code.
--
Éric Araujo mer...@netwok.org added the comment:
It's undocumented, and it begins with an underscore, but it would certainly
be safer
to deprecate it first.
Ah, somehow I misunderstood your earlier comment and thought _get_args had been
publicized. Removing is safe then.
Geoffrey:
If
Éric Araujo mer...@netwok.org added the comment:
Following Steven’s message, I will remove the unused function.
--
assignee: - eric.araujo
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14075
New submission from Tshepang Lekhonkhobe tshep...@gmail.com:
It appears to me that the function I removed (see attached patch) is unused.
Since I wasn't sure, I ran the entire test suite, and there wasn't a regression.
--
components: Library (Lib)
files: rm-unused-function.patch
Changes by Nadeem Vawda nadeem.va...@gmail.com:
--
nosy: +bethard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14075
___
___
Python-bugs-list
Petri Lehtinen pe...@digip.org added the comment:
The _get_args() looks like an obsolete function indeed. However,
_AttributeHolder is a base class for other classes, so the function was
probably meant to be overridden by a subclass.
Steven probably knows the best whether it should be kept or
Changes by Geoffrey Spear geoffsp...@gmail.com:
--
nosy: +geoffreyspear
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14075
___
___
Steven Bethard steven.beth...@gmail.com added the comment:
Yeah, the intention was that you could just override _get_args in a subclass to
get a better __repr__. I think these days all the argparse classes only have
keyword arguments, so _get_args probably isn't necessary anymore.
--
12 matches
Mail list logo