* Tim Johnson <t...@johnsons-web.com> [110620 10:28]:
> Currently using python 2.6, but am serving some systems that have
> older versions of python (no earlier than.
> Question 1:
> With what version of python was str.format() first implemented?
> Question 2:
> Given the following string:
> S = 'Coordinates: {latitude}, {longitude}'
> Is there a python library that would provide an optimal way
> to parse from S the following
> {'latitude':"",'longitude':""}
> ?
P.S. :
One solution would be
import re
re.findall(r'\{([^}]*)\}', s) ## I think, being a regex dummy..
But perhaps there is something more efficient than re?
cheers
--
Tim
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com
--
http://mail.python.org/mailman/listinfo/python-list