[issue13107] Text width in optparse.py can become negative

2011-10-05 Thread Adam Byrtek

New submission from Adam Byrtek adambyr...@gmail.com:

Code snippet from optparse.py:

   344 self.help_position = min(max_len + 2, self.max_help_position)
   345 self.help_width = self.width - self.help_position

Where self.width is initialized with the COLUMNS environment variable. On 
narrow terminals it can happen that self.help_position  self.width, leading to 
an exception in textwrap.py:

raise ValueError(invalid width %r (must be  0) % self.width)
ValueError: invalid width -15 (must be  0)

A reasonable workaround would be to trim part of the help text instead of 
causing an exception.

--
components: Library (Lib)
messages: 144947
nosy: adambyrtek
priority: normal
severity: normal
status: open
title: Text width in optparse.py can become negative
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13107
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Adam Byrtek

Adam Byrtek adambyr...@gmail.com added the comment:

What happened with there should be one-- and preferably only one --obvious way 
to do it?

--
nosy: +adambyrtek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10562
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-03 Thread Adam Byrtek

Changes by Adam Byrtek adambyr...@gmail.com:


--
nosy:  -adambyrtek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10562
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com