Trying to understand Python objects

Ben Finney bignose+hates-spam at
Wed Nov 22 02:29:25 CET 2006

Ben Finney <bignose+hates-spam at> writes:

> Or, the attributes are added to a specific instance (often in the
> initialisation method) so that each instance has a separate attribute
> with the same name::

The example here should have been::

    class Point(object):
        spam = 4
        def __init__(self):
            self.eggs = 2

 \      "For mad scientists who keep brains in jars, here's a tip: why |
  `\    not add a slice of lemon to each jar, for freshness?"  -- Jack |
_o__)                                                           Handey |
Ben Finney

More information about the Python-list mailing list