On Sep 24, 9:09 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:

> Python:
>
> class B(object):
>     def __init__(self):
>         self.things = list()
>
>     def add(self, thing):
>         self.things.append(thing)
>
> And Io:
>
> B := Object clone do(
>     init := method(
>         self things := list()
>         self
>     )
>
>     add := method(thing,
>         self things append(thing)
>     )
> )
>
> The `init` is called by the default `clone` method automatically just like
> `__init__()` in Python.  It is really much like the class/instance
> relationship in Python with just the line between class and instance
> blurred.

[...]

> Ciao,
>         Marc 'BlackJack' Rintsch

O.K. Marc, I'm convinced by the examples you presented. So init is
also special in Io and is called at the clone event to fill object
slots with data.

Now I have to track back in the discussion thread to remember why we
started to talk about Io...

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to