Hi Jason,
<< After a few days with Python I am wondering how to 'pickle' Rebol
objects? >>
I guess that depends on exactly what your needs are. With REBOL, you have a
number of options. You can MOLD objects and then write them out, you can
write out just the spec block for them, you can serialize things out as
blocks - or any data really - even if they aren't objects. This is one of
those things that is so simple in REBOL, it makes you forget how hard it is
in other languages (i.e. that they have to provide serialization mechanisms
which were probably a lot of work for them to write :). The great benefit of
code/data duality shines bright.
SAVE and MOLD both have an /ALL refinement now which creates a "true"
serialized format.
>> o: make object! [a: 1 b: none c: [EMAIL PROTECTED] d: false]
>> mold o
== {
make object! [
a: 1
b: none
c: [EMAIL PROTECTED]
d: false
]}
>> mold/all o
== {
#[object! [
a: 1
b: #[none]
c: #[email! "[EMAIL PROTECTED]"]
d: #[false]
]]}
>> o2: do load mold o
>> probe o2
make object! [
a: 1
b: none
c: [EMAIL PROTECTED]
d: false
]
>> o2: load mold/all o
>> probe o2
make object! [
a: 1
b: none
c: [EMAIL PROTECTED]
d: false
]
--Gregg
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.