self.python vs Current.eiffel

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Sep 26 09:29:42 EDT 2000


Tue, 26 Sep 2000 15:56:53 +0200, Egbert Bouwman <egbert at bork.demon.nl> pisze:

> I am lost. What are the differences between python's self and x,
> and Eiffel's Current and x ?

Python allows assignments to arbitrary fields of arbitrary objects,
but does not bring instance variables into the current namespace.
So they must always be accessed through an explicitly written object,
no matter if it's self or something other.

Eiffel only allows assignment to self's fields (and local variables).
It does bring them into the namespace, so they can be referred to
with or without Current, but assigned to - only without Current, as
it would me meaningless anyway to have something other than Current
in an assignment.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list