equal
deleted
inserted
replaced
1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
35 |
35 |
36 def pformat(obj): |
36 def pformat(obj): |
37 """pretty prints `obj` if possible""" |
37 """pretty prints `obj` if possible""" |
38 try: |
38 try: |
39 return _pformat(obj) |
39 return _pformat(obj) |
40 except: |
40 except Exception: |
41 return u'<could not parse>' |
41 return u'<could not parse>' |
42 |
42 |
43 def qs2dict(qs): |
43 def qs2dict(qs): |
44 """transforms a query string into a regular python dict""" |
44 """transforms a query string into a regular python dict""" |
45 result = {} |
45 result = {} |