Commit ca9e3f18 authored by Jim Fulton's avatar Jim Fulton

Added __basicnew__ class protocol.

Added support for user-defined method attributes.  User-defined method
attributes can only be set or accessed for bound methods.
User-defined method attributes are stored in instances under a name
formed by concatinating the method and attribute names.  Default
values for user-defined method attributes may be set in the class
statement. For example, to define the default '__roles__' attribute of
a method, 'f'::

   class C:
      def f(self): print 'f called'
      f__roles__=('manage',)

User-defined attributes may not be set in restricted execution mode.
User-defined attribute names may only be accessed in
restricted-execution mode if their names begin with double
underscores.

Added default __cmp__ support for extension subclasses.  I only
recently noticed that extension subclasses overcome Python's
willingness to only compare objects of the same type, because they
smell to Python like numeric types.
parent 7224d742
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