<p dir="ltr"><br>
On Mar 22, 2016 4:36 PM, "Andrey Vlasovskikh" <<a href="mailto:andrey.vlasovskikh@gmail.com">andrey.vlasovskikh@gmail.com</a>> wrote:<br>
><br>
><br>
> > 2016-03-19, в 5:12, Wes Turner <<a href="mailto:wes.turner@gmail.com">wes.turner@gmail.com</a>> написал(а):<br>
> ><br>
> > This sounds like a more correct approach, thanks.<br>
> ><br>
> > Looking at MarkupSafe (and, now, f-strings), would/will it be possible to use Typing.Text as a base class for even-more abstract string types ("strypes") e.g. XML, XHTML, HTML4, HTML5, HTML5.1, SQL? There are implicit casts and contextual adaptations/transformations (which MarkupSafe specs a bit). (I've no real code here, just a general idea that we're not tracking enough string metadata to be safe here)<br>
><br>
> I believe having separate string types for XML or SQL content is out of the scope of this proposal.<br>
><br>
> In PyCharm we already treat the contents of string literals with SQL as a separate SQL syntax tree and we understand basic string operations like concatenation or formatting. Going beyond that with the help of XML/SQL/etc. string types is possible, but I doubt we need a standard for that.</p>
<p dir="ltr">At the least, it would be helpful to either have:</p>
<p dir="ltr">a) a slot / attribute for additional string type metadata (is this an object subclass that I can just add attrs to)<br>
b) a minimal Text base class</p>
<p dir="ltr">SQL is harder because dialects.</p>
<p dir="ltr">><br>
> --<br>
> Andrey Vlasovskikh<br>
><br>
> Web: <a href="http://pirx.ru/">http://pirx.ru/</a><br>
><br>
</p>