Skip to content

Commit

Permalink
bound value subtyping at AttMapEcho
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Feb 20, 2019
1 parent 5c702b2 commit 43c7aeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion attmap/attmap_echo.py
Expand Up @@ -4,7 +4,13 @@
from ._mixins import *


class AttMapEcho(HomogeneousMixin, EchoMixin, AttMap):
class AttMapEcho(EchoMixin, AttMap):
""" An AttMap that returns key/attr if it has no set value. """

def __contains__(self, item):
return item in self.__dict__

@property
def _lower_type_bound(self):
""" Most specific type to which an inserted value may be converted """
return AttMapEcho

0 comments on commit 43c7aeb

Please sign in to comment.