On Wed, 2007-12-12 at 12:48 -0800, [EMAIL PROTECTED] wrote:
> Thanks to all!
> 
> I will put my class defs first (tho not without expressing my
> disappointment that this is required in a late 20th century language);

You don't have to physically *put* class definitions first in your code.
What matters is that they get *executed* first. They following will work
just fine:

#######################
def main():
  x = SomeClass()
  x.DoSomething()

class SomeClass:
  ...

main()
#######################

Expecting to use a class before it's defined is equivalent to expecting
this to work:

########################
print a
a = "Hello World"
########################

Even here in the early 21st century, we don't have clairvoyant computers
yet.

-- 
Carsten Haese
http://informixdb.sourceforge.net


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

Reply via email to