4 ms·
There should be one (and preferably only one) obvious way to do it. *.encode(x) was pretty obvious. The new stuff is not.
by sp332 14y ago
There should be one (and preferably only one) obvious way to do it. *.encode(x) was pretty obvious. The new stuff is not.
- jrockway 14y agoUltimately, adding random methods to classes introduces many subtle side effects. (See my reply to a sibling comment above.) There's noting intrinsically obvious about making the string class responsible for encoding and decoding, other than the fact that help("") mentions the existence of that method. Most other useful utilities that operate on strings are separate classes or modules; re, for example.