Rev 4772: Don't allow extra attributes on the pure-python StaticTuple. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-pure-static-tuple

John Arbash Meinel john at arbash-meinel.com
Tue Oct 27 03:39:25 GMT 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-pure-static-tuple

------------------------------------------------------------
revno: 4772
revision-id: john at arbash-meinel.com-20091027033916-ol3lz84kd2ts9h5b
parent: pqm at pqm.ubuntu.com-20091026155954-r9gw2rizkikw7cg7
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-pure-static-tuple
timestamp: Mon 2009-10-26 22:39:16 -0500
message:
  Don't allow extra attributes on the pure-python StaticTuple.
  
  Should save some memory as well.
-------------- next part --------------
=== modified file 'bzrlib/_static_tuple_py.py'
--- a/bzrlib/_static_tuple_py.py	2009-10-21 16:04:03 +0000
+++ b/bzrlib/_static_tuple_py.py	2009-10-27 03:39:16 +0000
@@ -24,6 +24,8 @@
 class StaticTuple(tuple):
     """A static type, similar to a tuple of strings."""
 
+    __slots__ = ()
+
     def __new__(cls, *args):
         # Make the empty StaticTuple a singleton
         if not args and _empty_tuple is not None:



More information about the bazaar-commits mailing list