[Python-Dev] PEP 467: last round (?) (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sat Sep 3 12:59:16 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 467: last round (?)
- Next message (by thread): [Python-Dev] PEP 467: last round (?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3 September 2016 at 03:54, Koos Zevenhoven <k7hoven at gmail.com> wrote:
chrb seems to be more in line with some bytes versions in for instance os than bchr.
The mnemonic for the current name in the PEP is that bchr is to chr as b"" is to "". The PEP should probably say that in addition to pointing out the 'unichr' Python 2 inspiration, though.
The other big difference between this and the os module case, is that the resulting builtin constructor pairs here are str/chr (arbitrary text, single code point) and bytes/bchr (arbitrary binary data, single binary octet). By contrast, os.getcwd() and os.getcwdb() (and similar APIs) are both referring to the same operating system level operation, they're just requesting a different return type for the data.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message (by thread): [Python-Dev] PEP 467: last round (?)
- Next message (by thread): [Python-Dev] PEP 467: last round (?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]