2 ms·
Well... Python is a little bit better, e.g.: >>> class Person: ... x = "lol" ... y = "right?" ... >>> "{0.x} {0.y}".format(Person()) 'lol
by igorgue 16y ago
Well... Python is a little bit better, e.g.:
>>> class Person:
... x = "lol"
... y = "right?"
...
>>> "{0.x} {0.y}".format(Person())
'lol right?'
Also this function: http://stackoverflow.com/questions/610406/javascript-printf-string-format/4256130#4256130 http://stackoverflow.com/questions/610406/javascript-printf-... adding it to the String objects would be cool too.