[Python-ideas] Transportable indent level markers. >>>===<<<

Nick Coghlan ncoghlan at gmail.com
Thu Dec 15 06:25:33 CET 2011


On Thu, Dec 15, 2011 at 3:09 PM, Ron Adam <ron3200 at gmail.com> wrote:
> Lets say you are going to past in several locations in a file and those
> locations may have different indent levels.  How would you write that
> using your suggestion so you don't have to change it in anyway for it to
> work.
>
> With my suggestion, that would just work no matter the source file
> indent level. (*)  All you need is the line numbers to insert it at.  I
> think with your idea, you would also need a place holder of some type.

OK, I at least understand what you're trying to do now. However, I
don't think you have a valid use case. What would a templating
language based on your notation look like? How would you extend it to
implement multi-line lambdas? If you can't cleanly do those two
things, who cares if it lets you copy and paste snippets at arbitrary
points in a Python file? What's the *functional* pay-off for the
ugliness?

(And I freely admit that my suggestion is also quite ugly. However,
the status quo, with everyone inventing assorted templating languages
for use with Python that are largely independent of Python itself
already sucks)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list