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

Martin v. Löwis report at bugs.python.org
Fri Jan 6 07:10:02 CET 2012


Martin v. Löwis <martin at v.loewis.de> added the comment:

Zitat von Antoine Pitrou <report at bugs.python.org>:

> Antoine Pitrou <pitrou at free.fr> added the comment:
>
> The point of named tuples here is that you can use both
>     get_terminal_size().columns
> or
>     columns, rows = get_terminal_size()
> depending on the situation.

And my point is that we should make the choice which
of these is more obvious, and drop the other.

> Also, the better repr() makes debugging easier.

A class could still have a nice repr.

----------

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


More information about the Python-bugs-list mailing list