> > So my point was that it would be cool to have a dedicated statement for
> this
Look in the archives of this list — therewasa rejected proposal for
dedented strings as s language feature fairly recently.
-CHB
>
> --
Christopher Barker, PhD
Python Language Consulting
- Teaching
-
On Tue, Mar 26, 2019 at 2:02 PM Chris Angelico wrote:
>
> On Tue, Mar 26, 2019 at 9:49 PM Mikhail V wrote:
> > Procedural removal is not cool, because it does not know the parent
> > indentation
> > [...]
> > E.g. this:
> > s = """
> > Hello
> > world"""
> >
On Tue, Mar 26, 2019 at 9:49 PM Mikhail V wrote:
> Procedural removal is not cool, because it does not know the parent
> indentation
> of the statement that contains the text block, thus it can't resolve
> automatically
> string indents that were intentionally indented to include extra space.
>
On Tue, Mar 26, 2019 at 7:04 AM fhsxfhsx wrote:
>
> Just as to your example, you can try `textwrap.dedent`
>
Procedural removal is not cool, because it does not know the parent indentation
of the statement that contains the text block, thus it can't resolve
automatically
string indents that were
Just as to your example, you can try `textwrap.dedent`
At 2019-03-26 00:32:26, "Mikhail V" wrote:
>Not a proposal yet, but some thoughts:
>I think it would help in a longer perspective if a user could
>include a directive in the header of the source code file that
>defines indentation
On Mon, Mar 25, 2019 at 9:33 AM Mikhail V wrote:
> Not a proposal yet, but some thoughts:
> I think it would help in a longer perspective if a user could
> include a directive in the header of the source code file that
> defines indentation character(s) for this source file. So this
> source
Not a proposal yet, but some thoughts:
I think it would help in a longer perspective if a user could
include a directive in the header of the source code file that
defines indentation character(s) for this source file. So this
source would be parsed strictly by this char (or sequence).
E.g.: