grenieda at hotmail.com
Thu Nov 15 15:35:54 CET 2001
Ok got two problems, we're trying to build a mini-scheme interpreter. But I
still think you people could figure out my problem without even knowing
"""structure de donnée de base pour les paires Scheme"""
self.car = carpart
self.cdr = cdrpart
a='(' + str(self.car)
a=a + ' ' + str(champ.car)
a=a + ' ' + str(champ) + ')'
This builds a cons, a pair as in scheme, when printing it it should output
something like this:
(1 2 3 1) but it seems (i don't understand why and I think I cheked it) to
ouput it like that (1 (2 (3 1))), note that a liste (made of cons) in scheme
is made like this: cons(1 cons(1,2)) this would create the list (1 1 2).
More information about the Python-list