[issue13609] Add "os.get_terminal_size()" function

Denilson Figueiredo de Sá report at bugs.python.org
Sun Jan 22 01:20:02 CET 2012


Denilson Figueiredo de Sá <denilsonsa at gmail.com> added the comment:

On Sat, Jan 21, 2012 at 17:40, Giampaolo Rodola' <report at bugs.python.org> wrote:
>
> Given the different opinions about the API, I think it's best to expose the lowest
> level functionality as-is, and let the user decide what to do (read env vars first,
> suppress the exception, use a fallback, etc.).

As a Python user (and not a committer), I disagree.

As an user, I don't care too much where the function should be placed
(although I believe os or sys are sensible choices). What I do care is
that I want a extremely simple function that will "just work". Don't
make me add code for handling all the extra cases, such code should be
inside the function.

All this discussion about the API made me remember this presentation:
http://python-for-humans.heroku.com/

Also, I see no downside of using a Named Tuple. Issue 4285 actually
added a named tuple to the sys.version_info.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13609>
_______________________________________


More information about the Python-bugs-list mailing list