On Sun, Sep 4, 2016 at 1:23 AM, Ivan Levkivskyi <levkivskyi at gmail.com> wrote: > On 4 September 2016 at 00:11, Random832 <random832 at fastmail.com> wrote: >> >> On Sat, Sep 3, 2016, at 18:06, Koos Zevenhoven wrote: >> > I guess one reason I don't like bchr (nor chrb, really) is that they >> > look just like a random sequence of letters in builtins, but not >> > recognizable the way asdf would be. >> > >> > I guess I have one last pair of suggestions for the name of this >> > function: bytes.chr or bytes.char. >> >> What about byte? Like, not bytes.byte, just builtins.byte. > > > I like this option, it would be very "symmetric" to have, compare: > >>>>chr(42) > '*' >>>>str() > '' > > with this: > >>>>byte(42) > b'*' >>>>bytes() > b'' > > It is easy to explain and remember this. In one way, I like it, but on the other hand, indexing a bytes gives an integer, so maybe a 'byte' is just an integer in range(256). Also, having both byte and bytes would be a slight annoyance with autocomplete. -- Koos
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