diff --git a/CHANGES.rst b/CHANGES.rst index aaf1b8e..9a61308 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ Changelog 3.3dev (unreleased) ------------------- +* Allow vGeo to be instantiated with list and not only tuples of geo + coordinates. Fixes #83. + [thet] + * Don't force to pass a list to vDDDLists and allow setting individual RDATE and EXDATE values without having to wrap them in a list. [thet] diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index 51f15e4..5ef8272 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -1215,6 +1215,12 @@ class vUri(str): class vGeo: """A special type that is only indirectly defined in the rfc. + Pass a list + >>> g = vGeo([1.2, 3.0]) + >>> g.to_ical() + '1.2;3.0' + + Pass a tuple >>> g = vGeo((1.2, 3.0)) >>> g.to_ical() '1.2;3.0' @@ -1234,7 +1240,7 @@ class vGeo: def __init__(self, geo): try: - latitude, longitude = geo + latitude, longitude = (geo[0], geo[1]) latitude = float(latitude) longitude = float(longitude) except: