Package tdi :: Module _util
[frames] | no frames]

Module _util

source code

Misc Utilities

Misc utilities.


Copyright: Copyright 2006 - 2015 André Malo or his licensors, as applicable

License:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author: André Malo

Functions
list
find_public(space)
Determine all public names in space
source code
property
Property(func)
Property with improved docs handling
source code
callable
decorating(decorated, extra=None)
Create decorator for designating decorators.
source code
Variables
  __doc__ = __doc__.encode('ascii').decode('unicode_escape')
  __package__ = 'tdi'
Function Details

find_public(space)

source code 
Determine all public names in space
Parameters:
  • space (dict) - Name space to inspect
Returns: list
List of public names

Property(func)

source code 
Property with improved docs handling
Parameters:
  • func (callable) - The function providing the property parameters. It takes no arguments as returns a dict containing the keyword arguments to be defined for property. The documentation is taken out the function by default, but can be overridden in the returned dict.
Returns: property
The requested property

decorating(decorated, extra=None)

source code 
Create decorator for designating decorators.
Parameters:
  • decorated (function) - Function to decorate
  • extra (dict) - Dict of consumed keyword parameters (not existing in the originally decorated function), mapping to their defaults. If omitted or None, no extra keyword parameters are consumed. The arguments must be consumed by the actual decorator function.
Returns: callable
Decorator

Variables Details

__doc__

Value:
__doc__.encode('ascii').decode('unicode_escape')

__package__

Value:
'tdi'