Package gnue :: Package appserver :: Package language :: Module Object :: Class NullObject
[show private | hide private]

Class NullObject


Method Summary
  __init__(self, session, proxy, classname, definition)
  __call__(self, *args)
  __cmp__(self, other)
This function compares an instance with another object.
  __coerce__(self, attr)
  __eq__(self, other)
  __getattr__(self, attr)
This function simulates access to a property of the instance.
  __gt__(self, other)
  __lt__(self, other)
  __ne__(self, other)
  __nonzero__(self)
A NullObject instance always has a truth-value of 'False' (like None has).
  __repr__(self)
This function returns the official string representation of an instance
  __str__(self)
The informal representation is just 'empty'

Method Details

__init__(self, session, proxy, classname, definition)
(Constructor)

__call__(self, *args)
(Call operator)

__cmp__(self, other)
(Comparison operator)

This function compares an instance with another object.

__coerce__(self, attr)

__eq__(self, other)
(Equality operator)

__getattr__(self, attr)
(Qualification operator)

This function simulates access to a property of the instance. While 'attr' is a reference property the instance itself will be returned, changing the class to the referenced by the property. For all other property-types None will be return
Returns:
self for reference properties, None for non-reference properties.

__gt__(self, other)
(Greater-than operator)

__lt__(self, other)
(Less-than operator)

__ne__(self, other)
(Inequality operator)

__nonzero__(self)
(Boolean test operator)

A NullObject instance always has a truth-value of 'False' (like None has). This is used for constructs like: "if x: ..."

__repr__(self)
(Representation operator)

This function returns the official string representation of an instance

__str__(self)
(Informal representation operator)

The informal representation is just 'empty'


GNUe Home

Public API

Developer's Corner