On Fri, May 11, 2018 at 10:25 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: > Chris Angelico <ros...@gmail.com>: > >> Octal makes a lot of sense in the right contexts. > > I think octal is a historical relic from a time when people weren't yet > comfortable with hexadecimal.
And any other situation where it makes more sense to group bits into threes instead of fours. For instance, if you have a six-bit byte, there's no point using hex. Or if you're working with seven-bit bytes and use the high bit as a continuation marker. >> Allowing octal literals is a Good Thing. > > I think it's just unavoidable mainly because of os.chmod. And a variety of other contexts. Yes, chmod is probably the only one that typical people will come across, but atypical people who read packet diagrams are just as likely to group bits in other ways than octets. If you were to create a new programming language _today_, you MIGHT be able to get away with not having any form of octal literal (and force people to use something like int("100644", 8) to define file modes). Emphasis on might. For any language that's been around for 20+ years, octal was too important to not retain, and too useful even today to discard as a mere historical relic. ChrisA -- https://mail.python.org/mailman/listinfo/python-list