[Checkins] SVN: zope.location/trunk/src/zope/location/location.txt
make sure locating twice does work
Christian Zagrodnick
cz at gocept.com
Wed Aug 22 07:04:28 EDT 2007
Log message for revision 79114:
make sure locating twice does work
Changed:
U zope.location/trunk/src/zope/location/location.txt
-=-
Modified: zope.location/trunk/src/zope/location/location.txt
===================================================================
--- zope.location/trunk/src/zope/location/location.txt 2007-08-22 09:42:59 UTC (rev 79113)
+++ zope.location/trunk/src/zope/location/location.txt 2007-08-22 11:04:28 UTC (rev 79114)
@@ -115,7 +115,13 @@
>>> a_located.__name__
'a'
+If we locate the object again, nothing special happens:
+>>> a_located_2 = located(a_located, parent, 'a')
+>>> a_located_2 is a_located
+True
+
+
If the object does not provide ILocation a LocationProxy is returned:
>>> l = [1, 2, 3]
@@ -131,3 +137,12 @@
False
>>> type(l_located)
<class 'zope.location.location.LocationProxy'>
+>>> l_located_2 = located(l_located, parent, 'l')
+>>> l_located_2 is l_located
+True
+
+When chaning the name, we still do not get a different proxied object:
+
+>>> l_located_3 = located(l_located, parent, 'new-name')
+>>> l_located_3 is l_located_2
+True
More information about the Checkins
mailing list