On 8/23/2015 12:09 AM, Nick Coghlan wrote:

Indeed, after working through this latest change, I ended up back
where I started from a syntactic perspective, with a proposal for
i(nterpolated)-strings rather than f(ormatted)-strings:

As I understand the two proposals, the essential difference, glossing
over surface syntax, is this. Compiling f'<template>' would parse the
template to an inaccessible structure of existing type (tuple?) and
process it at runtime with unreplaceable code returning a string with
interpolations. Compiling i'<templat>', in your latest revision, would
parse the template to an accessible structure of a new class. The new
class would have default code (in .__repr__) equivalent in result to the
f code. But additional methods or functions could return other strings
(or even non-strings). (Being able to access the structure for debugging
purposes might be helpful.) Is this basically it?

Terry Jan Reedy

Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2018 Grokbase