not that anyone asked, but I"d only support:

> 2a) Adding a str.dedent() method

and maybe:

> 2b) Creating a constant-folding peephole optimization for methods on
immutable literals

and frankly, it's a much lighter lift to get approval than:

1) Creating a new type of string literal which compiles to a dedented
form of multiline string

Also -- more useful -- dedent() is helpful for non-literals as well.

Other than docstrings, the case for literals is pretty small, and
docstrings are already auto-cleaned up.


> in all of the code I've ever written in Python (and that's quite a
> > lot...) I've never actually had a case where I this feature would have
> > made a significant difference to the code I wrote.


exactly -- I do have one case -- but that's for an instructional exercise
where we are keeping things simple -- in operational code that string would
have been in a file, or database, or ....

-CHB



-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to