mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-09 11:19:23 +08:00
providing default behavior for positions dictionary. non-existent positions are
returned as zero size/value positions.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import copy
|
||||
import pandas
|
||||
from ctypes import Structure, c_ubyte
|
||||
from collections import MutableMapping, defaultdict
|
||||
from collections import MutableMapping
|
||||
|
||||
|
||||
def Enum(*options):
|
||||
@@ -45,9 +45,9 @@ class ndict(MutableMapping):
|
||||
cls = None
|
||||
__slots__ = ['cls', '__internal']
|
||||
|
||||
def __init__(self, dct=None, default=None):
|
||||
if default is not None:
|
||||
self.__internal = defaultdict(default)
|
||||
def __init__(self, dct=None, internal=None):
|
||||
if internal is not None:
|
||||
self.__internal = internal
|
||||
else:
|
||||
self.__internal = dict()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user