[Python-ideas] Draft PEP on string interpolation

Wes Turner wes.turner at gmail.com
Mon Aug 24 20:14:35 CEST 2015


On Aug 24, 2015 12:39 PM, "Guido van Rossum" <guido at python.org> wrote:

> (...), and Nick can focus on motivational examples from html/sql/shell
code injection for PEP 501 (but only if he can live with the PEP 498
surface syntax for interpolation).

f('select {date} from {tablename}')
~=
['select ', UnescapedStr(date), 'from ', UnescapedStr(tablename)]

* UnescapedUntranslatedSoencodedStr
  * _repr_shell
    * quote or not?
  * _repr_html
    * charset, encoding
  * _repr_sql
    * WHERE x LIKE '%\%%'

>
> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150824/84ea82c6/attachment.html>


More information about the Python-ideas mailing list