Ticket #348 (assigned defect)

Opened 3 months ago

Last modified 44 hours ago

Add some way of being able to post process an object read

Reported by: nick Owned by:
Priority: major Milestone: 0.4
Component: Remoting Version: 0.3.1
Keywords: review Cc:

Description

Something like this would be good:

class A(object):
    pass

def pr_A(obj):
    if hasattr(obj, 'prop'):
        del obj.prop

    return obj

pyamf.register_class(A, 'A', post_read=pr_A)

An alias is required for this operation.

Change History

comment:1 Changed 2 months ago by thijs

  • milestone changed from 0.4 to 0.5

comment:2 Changed 44 hours ago by nick

  • keywords review added
  • owner nick deleted
  • status changed from new to assigned
  • milestone changed from 0.5 to 0.4

This ticket has been completed in source:pyamf/branches/gae-key-307. The ClassAlias? can now be subclassed and three new methods have been added: applyAttributes, createInstance, getAttributes all which help greatly to provide fine control for object/instance manipulation.

Note: See TracTickets for help on using tickets.