Bruce Leban writes:

 > where *!j* means join. It could optionally take a separator string as in
 > this example:

Converters *could* take arguments but they currently don't: it's a
simple switch on a str argument.

We already have one complex minilanguage inside {}, do we really want
another?

Maybe if we use regexps .... ;-) But seriously, if you want complex
conversions, you can just call a function in there, which gives you
arguments if you want them.  Or in this context you can wrap the
object in a proxy with an appropriate __format__.  This can be quite
generic, and allows you to put the arguments into the format spec.

Steve


_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XTWRFMVLWZWZENEJADECKBVCLWC4S3SR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to