mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Custom bicycle 'update_dict' was replaced with 'collections.defaultdict'.
This commit is contained in:
parent
03104bfbc3
commit
01b4c06916
2 changed files with 5 additions and 16 deletions
|
|
@ -7,17 +7,6 @@ from codecs import open as _open
|
|||
from itertools import groupby
|
||||
from operator import attrgetter
|
||||
|
||||
def update_dict(mapping, key, value):
|
||||
"""Update a dict intenal list
|
||||
|
||||
:param mapping: the mapping to update
|
||||
:param key: the key of the mapping to update.
|
||||
:param value: the value to append to the list.
|
||||
"""
|
||||
if key not in mapping:
|
||||
mapping[key] = []
|
||||
mapping[key].append(value)
|
||||
|
||||
|
||||
def get_date(string):
|
||||
"""Return a datetime object from a string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue