paul j3 <ajipa...@gmail.com> added the comment:

The idea of combining help features by defining a subclass that inherits from 
other subclasses was endorsed by the original developer (we could dig up an old 
bug/issue to prove that).

The provided subclasses all tweak a "private" method, often one that's buried 
deep in the calling stack.

I can't quote any official policy, but my sense is that Python developers are 
ok with users subclassing and modifying "private" methods.  Methods, functions 
and classes (and variables) with leading '_' aren't documented, or imported via 
`__all__`, but otherwise the boundary between what is part of the user API and 
what's "hidden" is loose in Python.  

Apparently some corporate policies prohibit use or modification of things that 
aren't in the public API, but I don't think that policy protects you from 
changes.  'argparse' changes at a glacial rate, with a lot of concern for 
backward compatibility.  In fact it's that fear of unintended consequences that 
slows down the pace of change.  Subclassing a help formatter is preferred 
because it minimizes the chance of hurting existing users.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45110>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to