diff options
Diffstat (limited to 'singledispatch_helpers.py')
-rw-r--r-- | singledispatch_helpers.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/singledispatch_helpers.py b/singledispatch_helpers.py index 2141568..8fcdce4 100644 --- a/singledispatch_helpers.py +++ b/singledispatch_helpers.py @@ -8,6 +8,7 @@ from __future__ import unicode_literals from abc import ABCMeta from collections import MutableMapping +import sys try: from collections import UserDict except ImportError: @@ -156,3 +157,14 @@ class MappingProxyType(UserDict): def get_cache_token(): return ABCMeta._abc_invalidation_counter + + + +class Support(object): + def dummy(self): + pass + + def cpython_only(self, func): + if 'PyPy' in sys.version: + return self.dummy + return func |