~ubuntu-branches/ubuntu/raring/python3.2/raring

« back to all changes in this revision

Viewing changes to Doc/extending/newtypes.rst

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-09-05 22:01:13 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: package-import@ubuntu.com-20110905220113-gmku3knwah89ojat
Tags: 3.2.2-0ubuntu1
* Python 3.2.2 release.
* Search headers in /usr/include/ncursesw for the curses/panel extensions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
just contains the refcount and a pointer to the object's "type object".  This is
31
31
where the action is; the type object determines which (C) functions get called
32
32
when, for instance, an attribute gets looked up on an object or it is multiplied
33
 
by another object.  These C functions are called "type methods" to distinguish
34
 
them from things like ``[].append`` (which we call "object methods").
 
33
by another object.  These C functions are called "type methods".
35
34
 
36
35
So, if you want to define a new object type, you need to create a new type
37
36
object.