GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Python
  • PSF
  • Docs
  • PyPI
  • Jobs
  • Community
  • Donate
  • A A
  • LinkedIn
  • Mastodon
  • Chat on IRC
  • Twitter
  • About
  • Applications

This view

  • Original page
  • New address

GeezerVison is showing www.python.org — New-style Classes

Warning

New-style classes has been integrated into Python 2.7 and old-style classes has been removed in Python 3. Please refer to the Python tutorial and the Descriptor HowTo Guide for more up-to-date documentation about classes and descriptors respectively.

Unfortunately, new-style classes have not yet been integrated into Python's standard documentation. Fear not, however; many people have worked to provide useful information on creating and using new-style classes:

  • Unifying types and classes (aka descrintro) is Guido's essay on new-style classes and should be your starting point.
  • Raymond Hettinger's How-To Guide for Descriptors focuses on the single most useful aspect of new-style classes (which includes properties).
  • Python 2.3 Method Resolution Order (MRO) covers multiple inheritance.
  • Metaclasses will make your head explode. Here are several approaches to discussing them:
    • David Mertz and Michele Simionato's DeveloperWorks article [1]
    • Mike Fletcher's slideshow
    • Metaclasses in Five Minutes
  • Types and Objects is the start of a new-style class tutorial with lots of figures and examples, but it's rough and not complete.
[1]The original article cannot be found on DeveloperWorks anymore. We've replaced it with a mirror.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.