[Python-Dev] #pragmas in Python source code

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Sat, 15 Apr 2000 12:45:15 +0200


M.-A. Lemburg wrote:
> Right. Let's do this step by step and get some experience first.
> With that gained experience we can still polish up the design
> towards a compromise which best suits all our needs.

so practical experience from other languages, other designs,
and playing with the python alphas doesn't count?

> The integration of Unicode into Python is comparable to the
> addition of floats to an interpreter which previously only
> understood integers.

use "long integers" instead of "floats", and you'll get closer to
the actual case.

but where's the problem?  python has solved this problem for
numbers, and what's more important: the language reference
tells us how strings are supposed to work:

    "The items of a string are characters." (see previous mail)

    "Strings are compared lexicographically using the numeric
    equivalents (the result of the built-in function ord()) of
    their characters."

this solves most of the issues.  to handle the rest, look at the
language reference description of integer:

    [Integers] represent elements from the mathematical set
    of whole numbers.

Borrowing the "elements from a single set" concept, define
characters as

    Characters represent elements from the unicode character
    set.

and let all mixed-string operations use string coercion, just like
numbers.

can it be much simpler?

</F>