[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Éric Araujo
Éric Araujo added the comment: A PR was opened for this. `text_len` is used as param/attribute name. -- versions: +Python 3.11 -Python 3.5 ___ Python tracker ___

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- pull_requests: +26574 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker ___

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12499] textwrap.wrap: add control for fonts with different character widths

2014-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both approaches can be combined. It could be a regular overridable method, and it could be overridded for an instance if corresponding argument is specified. See the default method and parameter of JSON encoder. I slightly hesitate about the name. Is

[issue12499] textwrap.wrap: add control for fonts with different character widths

2011-07-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: About the patch: the function should not be passed to the constructor, it could be a regular method that can be overridden in subclasses. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue12499] textwrap.wrap: add control for fonts with different character widths

2011-07-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Amaury, do you think it’s more common to subclass TextWrapper than just instantiate it? I find the proposed API (an argument to __init__) very intuitive. -- keywords: +needs review nosy: +eric.araujo, georg.brandl stage: - patch

[issue12499] textwrap.wrap: add control for fonts with different character widths

2011-07-05 Thread Tyler Romeo
Tyler Romeo tylerro...@gmail.com added the comment: Normally I would have just added it as a function to be overloaded, but because of the nature of the textwrap.wrap function (all kwargs are passed to the TextWrapper constructor) I thought it made a lot more sense to keep it as an argument

[issue12499] textwrap.wrap: add control for fonts with different character widths

2011-07-04 Thread Tyler Romeo
New submission from Tyler Romeo tylerro...@gmail.com: Originally from http://bugs.python.org/issue12485 but separated. The textwrap modules uses len to determine the length of text, but in many (if not most) fonts, the width of a character differs depending on the letter, so it would be