mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 21:17:17 +02:00
Further caching and optimization, making some operations noticeable faster in the end.
This commit is contained in:
parent
1a6ef5d983
commit
6e08c011a1
13 changed files with 78 additions and 73 deletions
|
|
@ -91,6 +91,8 @@ class TypeClass(object):
|
|||
transparently include the properties on
|
||||
self.dbobj. Note that dbobj properties have
|
||||
priority, so if you define a same-named
|
||||
|
||||
|
||||
property on the class, it will NOT be
|
||||
accessible through getattr.
|
||||
"""
|
||||
|
|
@ -115,8 +117,8 @@ class TypeClass(object):
|
|||
try:
|
||||
return _GA(dbobj,"get_attribute_raise")(propname)
|
||||
except AttributeError:
|
||||
string = "Object: '%s' not found on %s(%s), nor on its typeclass %s."
|
||||
raise AttributeError(string % (propname, dbobj, dbobj.dbref, dbobj.typeclass_path))
|
||||
string = "Object: '%s' not found on %s(#%s), nor on its typeclass %s."
|
||||
raise AttributeError(string % (propname, dbobj, dbobj.dbid, dbobj.typeclass_path))
|
||||
|
||||
def __setattr__(self, propname, value):
|
||||
"""
|
||||
|
|
@ -185,9 +187,9 @@ class TypeClass(object):
|
|||
try:
|
||||
dbobj.del_attribute_raise(propname)
|
||||
except AttributeError:
|
||||
string = "Object: '%s' not found on %s(%s), nor on its typeclass %s."
|
||||
string = "Object: '%s' not found on %s(#%s), nor on its typeclass %s."
|
||||
raise AttributeError(string % (propname, dbobj,
|
||||
dbobj.dbref,
|
||||
dbobj.dbid,
|
||||
dbobj.typeclass_path,))
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue