3 ms·
Didn't realise the C# intermediate step was there, always assumed it was a direct Python influence.
by Macha 6y ago
Didn't realise the C# intermediate step was there, always assumed it was a direct Python influence.
- steveklabnik 6y agoOh you know, I was confused. It was attributes from C#, not format strings. https://doc.rust-lang.org/stable/reference/attributes.html#attributes https://doc.rust-lang.org/stable/reference/attributes.html#a... > Attributes are modeled on Attributes in ECMA-335, with the syntax coming from ECMA-334 (C#).
- kibwen 6y agoI believe Rust took both attributes and format strings from C#. It looks like Python's modern format string syntax dates to 2006, and I think(?) that C#'s format string syntax has been present since its first release in 2002. The PEP adding the modern string formatting syntax links to .NET documentation, although the link is now dead: https://www.python.org/dev/peps/pep-3101/#references https://www.python.org/dev/peps/pep-3101/#references