4 ms·
It works after Python 3.5. From the article: > Another feature was % formatting of strings. Python 2 allowed use of the % formatting operator on both its strin
by reubenmorais 7y ago
It works after Python 3.5. From the article:
> Another feature was % formatting of strings. Python 2 allowed use of the % formatting operator on both its string types. But Python 3 initially removed the implementation of % from bytes. Why, I have no clue. It is perfectly reasonable to splice byte sequences into a buffer via use of a formatting string. But the Python language maintainers insisted otherwise. And it wasn't until the community complained about its absence loudly enough that this feature was restored in Python 3.5, which was released in September 2015.