"Raymond Hettinger" <[email protected]> writes: > [Steven Bethard] >>. Just saying "ok, switch your format strings >> from % to {}" didn't work in Python 3.0 for various good reasons, and >> I can't imagine it will work in Python 4.0 unless we have a transition >> plan. > > Do the users get any say in this?
I'm a user! :-)
I hate calling methods on string literals, I think it looks very odd to
have code like this:
"Displaying {0} of {1} revisions".format(x, y)
Will we be able to write this as
"Displaying {0} of {1} revisions" % (x, y)
too?
> I imagine that some people are heavily invested in %-formatting.
>
> Because there has been limited uptake on {}-formatting (afaict), we
> still have limited experience with knowing that it is actually better,
> less error-prone, easier to learn/rember, etc. Outside a handful of
> people on this list, I have yet to see anyone adopt it as the
> preferred syntax.
I've skimmed over the PEP, and the new {}-syntax seems to have some nice
features. But I've not seen it used anywhere yet.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
pgpWsgnx0JNG6.pgp
Description: PGP signature
_______________________________________________ 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
