What about using string prefix 'f'?

  f"{foo} and {bar}" % something == "{foo} and {bar}.format(something)

  s = f"{foo}"
  t = "%(bar)s"
  s + t  # raises Exception

Transition plan:
n: Just add F prefix. And adding "format_string" in future.
n+1: deprecate __mod__() without 'F'.
n+2: libraries use .format() and deprecate __mod__() with 'F'
n+3: remove __mod__()

-- 
Naoki INADA  <[email protected]>
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to