Commit 7956ca69 authored by Jim Fulton's avatar Jim Fulton

*** empty log message ***

parent 589034bc
Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
Copyright (C) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Acquisition
"Copyright (C) 1996-1998, Digital Creations":COPYRIGHT.html.
Acquisition [1] is a mechanism that allows objects to obtain
attributes from their environment. It is similar to inheritence,
except that, rather than traversing an inheritence hierarchy
to obtain attributes, a containment hierarchy is traversed.
The ExtensionClass release includes mix-in extension base classes
that can be used to add acquisition as a feature to extension
subclasses. These mix-in classes use the context-wrapping feature
of ExtensionClasses to implement acquisition. Consider the following
example::
The "ExtensionClass":ExtensionClass.html. release includes mix-in
extension base classes that can be used to add acquisition as a
feature to extension subclasses. These mix-in classes use the
context-wrapping feature of ExtensionClasses to implement
acquisition. Consider the following example::
import ExtensionClass, Acquisition
......
Extension Classes, Python Extension Types Become Classes
Jim Fulton, Digital Creations, Inc.
jim@digicool.com
"Copyright (C) 1996-1998, Digital Creations":COPYRIGHT.html.
Abstract
A lightweight mechanism has been developed for making Python
......
Installation
"Copyright (C) 1996-1998, Digital Creations":COPYRIGHT.html.
The ExtensionClass distribution now uses the "Universal Unix
Makefile for Python extensions", 'Makefile.pre.in', which was
introduced as part of Python1.4. Copies of this file for Python
......
Example: MultiMapping objects
"Copyright (C) 1996-1998, Digital Creations":COPYRIGHT.html.
As an example, consider an extension class that implements a
"MultiMapping". A multi-mapping is an object that encapsulates 0
or more mapping objects. When an attempt is made to lookup an
......@@ -400,3 +402,7 @@ Example: MultiMapping objects
m['spam'] # returns 3
m['ham'] # returns 4
m['foo'] # raises a key error
Note that the source file included in the ExtensionClass
distribution has numerous enhancements beyond the version shown in
this document.
COPYRIGHT.txt
COPYRIGHT.html
ExtensionClass.stx
ExtensionClass.html
Installation
......
......@@ -3,11 +3,12 @@
R=$1
M=ExtensionClass
StructuredText < $M.stx > $M.html
StructuredText < Installation > Installation.html
StructuredText < Acquisition.stx > Acquisition.html
StructuredText < MultiMapping.stx > MultiMapping.html
StructuredText < release.notes > release.html
StructuredText -t < $M.stx > $M.html
StructuredText -t < Installation > Installation.html
StructuredText -t < Acquisition.stx > Acquisition.html
StructuredText -t < MultiMapping.stx > MultiMapping.html
StructuredText -t < COPYRIGHT.txt > COPYRIGHT.html
StructuredText -t < release.notes > release.html
rm -rf "$M-$R"
mkdir "$M-$R"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment