Re: [Zope3-dev] Re: SVN: Zope3/branches/3.3/ - fix for issue 517: intid might generate long instead of int which conflicts with btrees

2006-06-18 Thread Christian Theune

Florent Guillaume wrote:

Christian Theune wrote:

Log message for revision 68700:
--- Zope3/branches/3.3/src/zope/app/intid/__init__.py2006-06-17 
03:29:43 UTC (rev 68699)
+++ Zope3/branches/3.3/src/zope/app/intid/__init__.py2006-06-17 
04:10:29 UTC (rev 68700)

@@ -47,7 +47,10 @@
 """
 implements(IIntIds)
 
-_v_nextid = None
+_v_nextid = None   ++# Used for testability of random 
function

+__randint__ = random.randint


You should avoid such __names__, they are supposed to be reserved. Here, 
__randint would have been quite enough I believe.


You're right. I still have to clean that up anyway, to make it work on 
the 64-bit systems. I'll either remove the name or change it, depending 
on how the tests need to be changed.


Christian

--
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: SVN: Zope3/branches/3.3/ - fix for issue 517: intid might generate long instead of int which conflicts with btrees

2006-06-17 Thread Florent Guillaume

Christian Theune wrote:

Log message for revision 68700:
--- Zope3/branches/3.3/src/zope/app/intid/__init__.py   2006-06-17 03:29:43 UTC 
(rev 68699)
+++ Zope3/branches/3.3/src/zope/app/intid/__init__.py   2006-06-17 04:10:29 UTC 
(rev 68700)
@@ -47,7 +47,10 @@
 """
 implements(IIntIds)
 
-_v_nextid = None
+_v_nextid = None   
+
+# Used for testability of random function

+__randint__ = random.randint


You should avoid such __names__, they are supposed to be reserved. Here, 
__randint would have been quite enough I believe.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com