3 ms·
"It would also render the previous ways obsolete." I don't think it would. If I understand this PEP correctly, the "format" method is significantly more dynami
by voyou 11y ago
"It would also render the previous ways obsolete."
I don't think it would. If I understand this PEP correctly, the "format" method is significantly more dynamic. For instance, I don't think this new PEP would allow for cases where the template isn't stored directly in the program, or where the values to interpolate are not local variables. So you would still need to keep str.format around for those use cases.