algebraic datatypes

Ronald Legere legere at adelphia.net
Sun Jun 24 15:07:03 EDT 2001


Marcin and group:
   That is a neat way to do it!   I posted this before I went away for the
weekend, and was wondering if
there was a way to do it with some kind of 'reflection' stuff. Seems like
there is :).

  Thanks!

"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
news:slrn.pl.9j99ee.2mc.qrczak at qrnik.zagroda...
> Sat, 23 Jun 2001 10:32:46 GMT, Ronald Legere <legere at adelphia.net> pisze:
>
> > Essentially,
> > datatype Tree = Node Tree Tree | Leaf Int
> > should translate into a class structure like this:
>
> from __future__ import nested_scopes
> import new, types
>
>





More information about the Python-list mailing list