Rev 4767: Add a comment to help Matthew Nordhoff understand why we have: in http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple-no-use

John Arbash Meinel john at arbash-meinel.com
Mon Oct 12 18:07:08 BST 2009


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

------------------------------------------------------------
revno: 4767
revision-id: john at arbash-meinel.com-20091012170705-g1v51yp2kfve4f0r
parent: john at arbash-meinel.com-20091012170340-o21aj90jbtswo9m4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-static-tuple-no-use
timestamp: Mon 2009-10-12 12:07:05 -0500
message:
  Add a comment to help Matthew Nordhoff understand why we have:
  
  _empty_tuple = None
  _empty_tuple = StaticTuple()
-------------- next part --------------
=== modified file 'bzrlib/_static_tuple_py.py'
--- a/bzrlib/_static_tuple_py.py	2009-10-07 16:12:50 +0000
+++ b/bzrlib/_static_tuple_py.py	2009-10-12 17:07:05 +0000
@@ -52,6 +52,8 @@
         return _interned_tuples.setdefault(self, self)
 
 
+# Have to set it to None first, so that __new__ can determine whether
+# the _empty_tuple singleton has been created yet or not.
 _empty_tuple = None
 _empty_tuple = StaticTuple()
 _interned_tuples = {}



More information about the bazaar-commits mailing list