kopia lustrzana https://github.com/collective/icalendar
* Allow vGeo to be instantiated with list and not only tuples of geo
coordinates. Fixes #83.pull/86/head
rodzic
2bac28729f
commit
87feaeaba1
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue