William James
10/16/2015 4:06:00 AM
Eduardo Costa wrote:
> I wonder whether Python has
> reading tools similar to the ones
> that I find in CL or Racket. I
> mean, something like (read), that
> can input lists, arrays, etc. Is
> there a function in Python to
> read Python lists? Is there
> something akin read macros in
> Python? I know that I should ask
> such a question in a Python
> discussion list, but it seems
> that Python programmers do not
> understand what I mean by Lisp
> like reading facilities.
If you are the one creating the data, perhaps you can use
marshalling.
MatzLisp (Ruby):
x = Marshal.dump( [2, 3+4, 5] )
==>"\004\b[\bi\ai\fi\n"
Marshal.restore( x )
==>[2, 7, 5]
--
A separation of the races is the only perfect preventive of amalgamation; but
as an immediate separation is impossible, the next best thing is to keep them
apart where they are not already together. If white and black people never get
together in Kansas, they will never mix blood in Kansas.
--- A. Lincoln, June 26, 1857