A better self
Erik Max Francis
max at alcyone.com
Thu Jul 18 18:39:29 EDT 2002
Max M wrote:
> I don't especially like "self" myself. But wouldn't it be easy enough
> to
> just:
An obvious issue is what happens with respect to bound and unbound
methods. The self argument is often implicit in normal work, but it
_is_ there, and needs to be set up properly. In your scheme, what
happens when you write:
def f(x, y): ... # not a method, no self, implicit or explicit
class C:
def m(x, y): ... # method, implicit self
g = f # what does this mean?
c = C()
um = C.m
um(c, ...) # how do I call this?
bm = c.m
bm(...) # or this?
Trying to hide the self argument is destined to only lead to massive
confusion.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ See the son in your bad day / Smell the flowers in the valley
\__/ Chante Moore
Bosskey.net: Aliens vs. Predator 2 / http://www.bosskey.net/avp2/
A personal guide to Aliens vs. Predator 2.
More information about the Python-list
mailing list