Ñò
†°Ic
@ sä d Z d d k l Z d d k Z d d k Z y d d k Z e i ƒ Z Wn% e j
o d „ Z e ƒ Z n Xd e
f d „ ƒ YZ d e
f d „ ƒ YZ d e
f d
„ ƒ YZ d e
f d „ ƒ YZ d
e
f d „ ƒ YZ d S( sã
Declarative objects for FormEncode.
Declarative objects have a simple protocol: you can use classes in
lieu of instances and they are equivalent, and any keyword arguments
you give to the constructor will override those instance variables.
(So if a class is received, we'll simply instantiate an instance with
no arguments).
You can provide a variable __unpackargs__ (a list of strings), and if
the constructor is called with non-keyword arguments they will be
interpreted as the given keyword arguments.
If __unpackargs__ is ('*', name), then all the arguments will be put
in a variable by that name.
Also, you can define a __classinit__(cls, new_attrs) method, which
will be called when the class is created (including subclasses).
iÿÿÿÿ( t
generatorsNc c s d } x | d 7} | Vq d S( Ni i ( ( t i( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyt _counter s
t classinstancemethodc B s# e Z d Z d „ Z d d „ Z RS( s÷
Acts like a class method when called from a class, like an
instance method when called by an instance. The method should
take two arguments, 'self' and 'cls'; one of these will be None
depending on how the method was called.
c C s
| | _ d S( N( t func( t selfR ( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyt __init__- s c C s t | i d | d | ƒS( Nt objt type( t _methodwrapperR ( R R R ( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyt __get__0 s N( t __name__t
__module__t __doc__R t NoneR
( ( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyR % s R c B s# e Z d „ Z d „ Z d „ Z RS( c C s | | _ | | _ | | _ d S( N( R R R ( R R R R ( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyR 5 s c O s | i | i | i f | | Ž S( N( R R R ( R t argst kw( ( s: /usr/lib/python2.6/site-packages/formencode/declarative.pyt __call__: s c C sO | i d j o d | i i | i i f Sd | i i | i i | i f Sd S( Ns