Numeric literals in other than base 10 - was Annoying octal notation

Piet van Oostrum piet at
Thu Aug 27 21:26:04 CEST 2009

>>>>> Mensanator <mensanator at> (M) wrote:

>M> On Aug 26, 4:59 pm, Piet van Oostrum <p... at> wrote:
>>> >>>>> Mensanator <mensana... at> (M) wrote:
>>> >M> That's my point. Since the common usage of "binary" is for
>>> >M> Standard Positional Number System of Radix 2, it follows
>>> >M> that "unary" is the common usage for Standard Positional
>>> >M> Number System of Radix 1. That's VERY confusing since such
>>> >M> a system is undefined. Remember, common usage does not
>>> >M> necessarily properly define things. Saying simply "unary"
>>> >M> sounds like you're extending common usage beyond its proper
>>> >M> boundaries.
>>> But the customary meaning of `unary' is the tally system, as a radix
>>> system wouldn't make sense. I don't know when this term came into use
>>> but I have known it for a long time.

>M> Ok, I'll accept that and in the same breath say such common usage
>M> is stupid. I, for one, have never heard such usage and would never
>M> use "unary" in the same breath as "decimal, octal, binary" even if
>M> I had.

As I see it, unary just means that there is one symbol. Binary just
means that there are two symbols, etc.

With unary, the only sensible numerical interpretation is to count the
number of occurrences of that symbol, or if you also want to have the
number 0, the number of occurrences - 1.

With binary and higher you can come up with more numerical
interpretations but the most efficient one is the radix interpretation
(for different values of `efficient'). I doubt that there are many other
interpretations that you can call sensible. Therefore we immediately
think of a radix system when we talk about binary, octal, decimal etc.
But the word `binary' itself doesn't imply that.
Piet van Oostrum <piet at>
URL: [PGP 8DAE142BE17999C4]
Private email: piet at

More information about the Python-list mailing list