New submission from Carsten Klein <carsten.kl...@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@python
components: Documentation
messages: 133173
nosy: carsten.klein, docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue11789>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to