Greg Ward wrote: > > On 07 June 2002, Tim Peters said: > > Greg seems to want to do it via setting vrbls on subclasses. I couldn't > > care less how it's done, so long as I have some way to wrap for readability > > in a fixed-width font. > > No subclass required -- just an instance: > > wrapper = TextWrapper() > wrapper.fix_sentence_endings = 0 > wrapper.wrap(...) > > Not sure if "fix_sentence_endings" is the right spelling, but it'll do > for now. Why three statements instead of one expression? textwrap.wrap_my_text(text, fix_sentence_endings = 0) If you want to do class-y stuff internally, then go ahead. But wrapping text is a stateless mathematical function with a domain and range. I'd prefer function syntax. Paul Prescod
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4