[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Trying to understand Python objects
From:       "walterbyrd" <walterbyrd () iname ! com>
Date:       2006-11-21 23:03:57
Message-ID: 1164150237.709846.38790 () e3g2000cwe ! googlegroups ! com
[Download RAW message or body]

Reading "Think Like a Computer Scientist" I am not sure I understand
the way it describes the way objects work with Python.

1) Can attributes can added just anywhere? I create an object called
point, then I can add attributes any time, and at any place in the
program?

2) Are classes typically created like this:

class Point:
  pass

Then attributes are added at some other time?

3) What is with the __underscores__ ??

4) Are parameters passed to an class definition?

class Whatever(params):
   pass

I sort-of understand the way objects work with PHP. With PHP, the
classes are defined in one place - sort of like a function. To me, that
makes more sense.

-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic