Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Status regarding Old vs. Advanced String Formating

martin at v.loewis.demartin at v.loewis.de
Sat Feb 25 01:20:39 CET 2012


Zitat von Tshepang Lekhonkhobe <tshepang at gmail.com>:> On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" <martin at v.loewis.de> wrote:>>> It is a burden for some people to learn and remember the exact details>>> of both systems and exactly how they differ. Having both in the stdlib>>> hurts readability for such people. I would prefer that the stdlib only>>> used {} formatting or if not that, that it only used the simple,>>> hard-to-forget forms of % formatting (%s, %d, %f, without elaboration).>>>> If that issue was getting serious, I would prefer if the .format method>> was deprecated, and only % formatting was kept.>> Why is that? Isn't .format regarded superior?I find the .format syntax too complicated and difficult to learn. It hasso many bells and whistles, making it more than just a *mini* language.So for my own code, I always prefer % formatting for simplicity.Regards,Martin


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp