A
Andrew Dalke
Out of curiosity, I tried passing using an invalid base
for a class. I can't explain why I got the error messages
I did. Can someone here enlighten me?
# Here I'm just curious
.... return a+b
........ pass
....
Traceback (most recent call last):
# What's 'function'? Why is it called?
....
Traceback (most recent call last):
# what were the three given arguments?
# is it something I can redefine?
.... def __getattr__(self, name):
.... print "Trying to get", repr(name)
.... raise AttributeError(name)
........
Traceback (most recent call last):
# doesn't look like it. What if I derive from an instance
# derived from object?
.... def __getattr__(self, name):
.... print "Trying to get", repr(name)
.... raise AttributeError(name)
........
Traceback (most recent call last):
# Okay.... Don't know what's going on, so I'll
# just fiddle around a bit.
.... def __init__(self): pass
........
Traceback (most recent call last):
.... def __init__(self, a): pass
........
Traceback (most recent call last):
# Which is it; 4 given or 1 given? And
# int had 3 passed to it....
.... def __init__(self, **args): print "I have", args
........
I have {}
Traceback (most recent call last):
Comments?
Andrew
(e-mail address removed)
for a class. I can't explain why I got the error messages
I did. Can someone here enlighten me?
# Here I'm just curious
.... return a+b
........ pass
....
Traceback (most recent call last):
# What's 'function'? Why is it called?
....
Traceback (most recent call last):
# what were the three given arguments?
# is it something I can redefine?
.... def __getattr__(self, name):
.... print "Trying to get", repr(name)
.... raise AttributeError(name)
........
Traceback (most recent call last):
# doesn't look like it. What if I derive from an instance
# derived from object?
.... def __getattr__(self, name):
.... print "Trying to get", repr(name)
.... raise AttributeError(name)
........
Traceback (most recent call last):
# Okay.... Don't know what's going on, so I'll
# just fiddle around a bit.
.... def __init__(self): pass
........
Traceback (most recent call last):
.... def __init__(self, a): pass
........
Traceback (most recent call last):
# Which is it; 4 given or 1 given? And
# int had 3 passed to it....
.... def __init__(self, **args): print "I have", args
........
I have {}
Traceback (most recent call last):
Comments?
Andrew
(e-mail address removed)