class documentation

class Trans:

View In Hierarchy

The purpose of this class is to store the actual translation function upon receiving the first call to that function. After this is done, changes to USE_I18N will have no effect to which function is served upon request. If your tests rely on changing USE_I18N, you can delete all the functions from _trans.__dict__.

Note that storing the function with setattr will have a noticeable performance effect, as access to the function goes the normal path, instead of using __getattr__.

Method __getattr__ Undocumented
def __getattr__(self, real_name):

Undocumented