Show More
@@ -1635,14 +1635,14 b' class Tuple(Container):' | |||||
1635 | class Dict(Instance): |
|
1635 | class Dict(Instance): | |
1636 | """An instance of a Python dict.""" |
|
1636 | """An instance of a Python dict.""" | |
1637 |
|
1637 | |||
1638 |
def __init__(self, default_value= |
|
1638 | def __init__(self, default_value={}, allow_none=True, **metadata): | |
1639 | """Create a dict trait type from a dict. |
|
1639 | """Create a dict trait type from a dict. | |
1640 |
|
1640 | |||
1641 | The default value is created by doing ``dict(default_value)``, |
|
1641 | The default value is created by doing ``dict(default_value)``, | |
1642 | which creates a copy of the ``default_value``. |
|
1642 | which creates a copy of the ``default_value``. | |
1643 | """ |
|
1643 | """ | |
1644 | if default_value is None: |
|
1644 | if default_value is None: | |
1645 |
args = |
|
1645 | args = None | |
1646 | elif isinstance(default_value, dict): |
|
1646 | elif isinstance(default_value, dict): | |
1647 | args = (default_value,) |
|
1647 | args = (default_value,) | |
1648 | elif isinstance(default_value, SequenceTypes): |
|
1648 | elif isinstance(default_value, SequenceTypes): | |
@@ -1657,15 +1657,15 b' class Dict(Instance):' | |||||
1657 | class EventfulDict(Instance): |
|
1657 | class EventfulDict(Instance): | |
1658 | """An instance of an EventfulDict.""" |
|
1658 | """An instance of an EventfulDict.""" | |
1659 |
|
1659 | |||
1660 |
def __init__(self, default_value= |
|
1660 | def __init__(self, default_value={}, allow_none=True, **metadata): | |
1661 | """Create a EventfulDict trait type from a dict. |
|
1661 | """Create a EventfulDict trait type from a dict. | |
1662 |
|
1662 | |||
1663 |
The default value is created by doing |
|
1663 | The default value is created by doing | |
1664 |
``eventful.EvenfulDict(default_value)``, which creates a copy of the |
|
1664 | ``eventful.EvenfulDict(default_value)``, which creates a copy of the | |
1665 | ``default_value``. |
|
1665 | ``default_value``. | |
1666 | """ |
|
1666 | """ | |
1667 | if default_value is None: |
|
1667 | if default_value is None: | |
1668 |
args = |
|
1668 | args = None | |
1669 | elif isinstance(default_value, dict): |
|
1669 | elif isinstance(default_value, dict): | |
1670 | args = (default_value,) |
|
1670 | args = (default_value,) | |
1671 | elif isinstance(default_value, SequenceTypes): |
|
1671 | elif isinstance(default_value, SequenceTypes): |
General Comments 0
You need to be logged in to leave comments.
Login now