I was kinda joking with the function. More pythonically:
def getattrchain(obj, attlist):
for item in attlist:
obj = getattr(obj, item)
return obj
-- Wade
> -Original Message-
> From: Wade Leftwich [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 6:0
attlist[0]), attlist[1:])
...
>>> getattrchain(a, ('b', 'prop'))
1234
-- Wade Leftwich
Ithaca, NY
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Lloyd
> Kvam
> Sent: Monday, July 23, 2001 4:51 PM
&g
> Do I have to define a function before it is used?
Yes.
> If so, is there a way to declare the function but define it at
> the end of my
> source file?
>
def main():
fun1()
fun2()
def fun1():
## do something
def fun2():
## do something else
if __name__ == '__
don't have the chops to contribute to
such an effort...)
-Original Message- From: Wade
Leftwich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 5:25 PM To: Bill Seitz; [EMAIL PROTECTED]
Subject: RE: problem using ODBC cursor.description with sql
View?