while (a=b()) ... infinite sets digression

Gordon McMillan gmcm at hypernet.com
Wed May 19 00:55:04 EDT 1999


Greg Ewing wrote:

> Chad Netzer wrote:
> > 
> >  So, there are infinitely more strings which start with underscores than do not,
> 
> Hmmm... this would seem to imply that there are
> infinitely many more strings starting with any
> given character than any other character.
> 
> Which seems absurd. Although where infinities
> are involved, that doesn't necessarily mean it's
> not true...
> 
> Tricky and dangerous beasts, these infinities!

Unfortunately, Chad mispoke. For any string beginning with an 
underscrore there are (num_possible_characters-1) strings not 
beginning with an underscore (just replace that first character).

But if there are Aleph-nought strings beginning with underscore, 
there are N*Aleph-nought == Aleph-nought not beginning with 
underscore.

Chad's trickery is in trying to get you to assume that Aleph-nough 
minus Aleph-nought is 0. Nice try.

All this assumes, of course, that you allow strings of infinte 
length. Personally, I don't. And since strings don't have sides, you 
can't even fake one by folding a finite-lengthed one into a Mobius 
string.

though-some-forms-of-Unicode-come-close-ly y'rs

- Gordon




More information about the Python-list mailing list