[issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes

Carsten Klein report at bugs.python.org
Wed Apr 6 23:55:21 CEST 2011


New submission from Carsten Klein <carsten.klein at axn-software.de>:

In zope.interface, you have something the following construct:

class InterfaceBase:
  pass

Interface = InterfaceBase()



Using the above Interface as a derivation base for your own classes, will make that instance a type derived class:

class IFoo(Interface):
  pass

type(IFoo)
-> Interface

type(Interface)
-> type


I wonder why this behavior is not documented in the official documentation, or at least, I was unable to find it there...

----------
assignee: docs at python
components: Documentation
messages: 133173
nosy: carsten.klein, docs at python
priority: normal
severity: normal
status: open
title: Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes
type: feature request
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11789>
_______________________________________


More information about the Python-bugs-list mailing list