1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Sample module used for testing
"""
from zope.interface import Interface
from zope import schema
data = []
class S1(Interface):
x = schema.BytesLine()
y = schema.Int()
class stuff:
def __init__(self, args, info, basepath, package, includepath):
(self.args, self.info, self.basepath, self.package, self.includepath
) = args, info, basepath, package, includepath
def handler(_context, **kw):
args = sorted(kw.items())
args = tuple(args)
discriminator = args
args = (stuff(args, _context.info, _context.basepath, _context.package,
_context.includepath), )
_context.action(discriminator, data.append, args)
|