reflection.py¶
A support package for self-reporting
-
class
reflection.Namespace(name='anonymous', **kwargs)[source]¶ Provide a cheap trivially repeatable namespace. I don’t know why a module or program would need two, but you can name it.
This probably lurks formally in python modules somewhere...
-
reflection.constant_dict(constant)[source]¶ allow simple specification of a defaultdict that uses a constant generator to default to the given constant.
constant the constant to be repeatedly generated
-
reflection.constant_iterator(constant)[source]¶ utility function to allow simple specification of a constant generator
constant the constant to be repeatedly generated
-
reflection.my_callername()[source]¶ Return the name of the caller of the method that invoked this method, so that it can know its caller’s name.
-
reflection.my_methodname()[source]¶ Return the name of the method that invoked this method, so that it can know its own name.