Package brisa :: Package utils :: Module properties
[hide private]
[frames] | no frames]

Module properties

source code

Facilities for python properties generation.

Functions [hide private]
 
gen_property_with_default(name, fget=None, fset=None, doc="")
Generates a property of a name either with a default fget or a default fset.
source code
 
gen_property_of_type(name, _type, doc="")
Generates a type-forced property associated with a name.
source code
Function Details [hide private]

gen_property_with_default(name, fget=None, fset=None, doc="")

source code 

Generates a property of a name either with a default fget or a default fset.

Parameters:
  • name (string) - property name
  • fget (callable or None) - default fget
  • fset (callable or None) - default fset
  • doc (string) - documentation for the property

gen_property_of_type(name, _type, doc="")

source code 

Generates a type-forced property associated with a name. Provides type checking on the setter (coherence between value to be set and the type specified).

Parameters:
  • name (string) - property name
  • _type (type) - force type
  • doc (string) - documentation for the property