3 ms·
I've been using Python daily for probably a decade and I didn't know there was an ascii() built-in. Seems it would have been better to add a str.ascii() method
by rgovostes 6y ago
I've been using Python daily for probably a decade and I didn't know there was an ascii() built-in. Seems it would have been better to add a str.ascii() method for ASCII-safe encoding of an arbitrary string, then repr().ascii() would accomplish the same goal while providing a useful method for other circumstances.
https://docs.python.org/3.8/library/functions.html#ascii https://docs.python.org/3.8/library/functions.html#ascii