Well, I finally ran into a Python Unicode problem, sort of

Christian Gollwitzer auriocus at gmx.de
Sun Jul 3 10:05:11 EDT 2016


Am 03.07.16 um 13:22 schrieb Marko Rauhamaa:
> Christian Gollwitzer <auriocus at gmx.de>:
>
>> Am 03.07.16 um 13:01 schrieb Marko Rauhamaa:
>>> Alain Ketterlin <alain at universite-de-strasbourg.fr.invalid>:
>>>
>>>> It would be very confusing to have a variable named ∇f, as confusing
>>>> as naming a variable a+b or √x.
>>>
>>> Scheme allows *any* characters whatsoever in identifiers.
>>
>> Parentheses?
>
> Yes.
>
> Hint: Python allows *any* characters whatsoever in strings.

My knowledge of Scheme is rusty. How do you do that? Consider

	(define x 'hello)

then the x is the identifier, isn't it? How can you include a 
metacharacter like space, ', or ( in it? I'm using 
https://repl.it/languages/scheme to try it out.

Another language which allows any characters in identifiers is Tcl. Here 
you can quote identifiers:

	set {a b} c

creates a variable "a b" with a space in it, because there is no 
distinction between quoted/unquoted. Metacharacters can be included by 
\-escapes. How does that work in Scheme?

	Christian




More information about the Python-list mailing list