/[gnue]/gnue-appserver/src/classrep/Class.py
ViewVC logotype

Diff of /gnue-appserver/src/classrep/Class.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by reinhard, Fri Sep 19 19:16:08 2003 UTC revision 1.9 by reinhard, Sun Oct 19 22:08:04 2003 UTC
# Line 21  Line 21 
21  #  #
22  # $Id$  # $Id$
23    
24    import types
25  from Base import *  from Base import *
26  from Namespace import *  from Namespace import *
27  from Property import *  from Property import *
# Line 124  class Class: Line 125  class Class:
125      self.classes    = classDict      self.classes    = classDict
126      self.module     = module      self.module     = module
127      self.definition = classDict.definition      self.definition = classDict.definition
128      self.fullName   = createName (module.gnue_name, object.gnue_name)      self.fullName   = createName (module.gnue_name, self.gnue_name)
129      self.table      = self.fullName      self.table      = self.fullName
130    
131      self.properties = PropertyDict (classDict.session, classDict.modules, self)      self.properties = PropertyDict (classDict.session, classDict.modules, self)
# Line 134  class Class: Line 135  class Class:
135    # Attribute access is redirected into the gnue-namespace    # Attribute access is redirected into the gnue-namespace
136    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
137    def __getattr__ (self, attr):    def __getattr__ (self, attr):
138      return getattr (self._object, attr)      value = getattr (self._object, attr)
139        if isinstance (value, types.UnicodeType):
140          return value.encode ('utf-8')
141        else:
142          return value
143    
144    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
145    # Return a property by name    # Return a property by name

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26