Changed property key format string
authorThierry Florac <thierry.florac@onf.fr>
Mon, 02 Mar 2015 10:53:34 +0100
changeset 6 09a8799da676
parent 5 930e6bc44d7d
child 7 ad40fd668164
Changed property key format string
src/pyams_utils/property.py
--- a/src/pyams_utils/property.py	Mon Mar 02 10:02:27 2015 +0100
+++ b/src/pyams_utils/property.py	Mon Mar 02 10:53:34 2015 +0100
@@ -77,7 +77,7 @@
             if callable(key):
                 key = key(obj)
             if not key:
-                key = '%r' % obj
+                key = '{0!r}'.format(obj)
             data = get_request_data(request, key, _marker)
             if data is _marker:
                 data = func
@@ -103,7 +103,7 @@
             if callable(key):
                 key = key(obj)
             if not key:
-                key = '%r' % obj
+                key = '{0!r}'.format(obj)
             data = get_session_data(request, app, key, _marker)
             if data is _marker:
                 data = func