Describe value that has one of the types given in arguments :param args: List of accepted types. Since :py:class:`Spec` is supposed to describe JSON values only ``dict``, ``list``, ``unicode``, ``bool``, ``float`` and ``NoneType`` types make any sense. :return: self.
(self, *args)
| 377 | return self |
| 378 | |
| 379 | def type(self, *args): |
| 380 | '''Describe value that has one of the types given in arguments |
| 381 | |
| 382 | :param args: |
| 383 | List of accepted types. Since :py:class:`Spec` is supposed to |
| 384 | describe JSON values only ``dict``, ``list``, ``unicode``, ``bool``, |
| 385 | ``float`` and ``NoneType`` types make any sense. |
| 386 | |
| 387 | :return: self. |
| 388 | ''' |
| 389 | self.checks.append(('check_type', args)) |
| 390 | return self |
| 391 | |
| 392 | cmp_funcs = { |
| 393 | 'le': lambda x, y: x <= y, |