Michael Urman writes: > It is somewhat troublesome that there doesn't appear to be an obvious > built-in idempotent-when-possible function that gives back the > provided bytes/str, If you want something idempotent, it's already the case that bytes(b'abc') => b'abc'. What might be desirable is to make bytes('abc') work and return b'abc', but only if 'abc' is pure ASCII (or maybe ISO 8859/1). Unfortunately, str(b'abc') already does work, but steve at uwakimon ~ $ python3.1 Python 3.1.2 (release31-maint, May 12 2010, 20:15:06) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> str(b'abc') "b'abc'" >>> Oops. You can see why that probably "should" be the case.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4