# Messages

The `pykka.messages` module contains Pykka’s own actor messages.

In general, you should not need to use any of these classes. However, they have been made part of the public API so that certain optimizations can be done without touching Pykka’s internals.

An example is to combine `ask()` and `ProxyCall` to call a method on an actor without having to spend any resources on creating a proxy object:

    reply = actor_ref.ask(
        ProxyCall(
            attr_path=['my_method'],
            args=['foo'],
            kwargs={'bar': 'baz'}
        )
    )

Another example is to use `tell()` instead of `ask()` for the proxy method call, and thus avoid the creation of a future for the return value if you don’t need it.

It should be noted that these optimizations should only be necessary in very special circumstances.

New in version 2.0.

class `pykka.messages.``ProxyCall`(attr_path, args, kwargs)
  `args`

    Alias for field number 1

  `attr_path`

    Alias for field number 0

  `kwargs`

    Alias for field number 2

class `pykka.messages.``ProxyGetAttr`(attr_path)
  `attr_path`

    Alias for field number 0

class `pykka.messages.``ProxySetAttr`(attr_path, value)
  `attr_path`

    Alias for field number 0

  `value`

    Alias for field number 1