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 5c4aa8b..3a71831 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, UserDict +import sys try: from thread import get_ident except ImportError: @@ -148,3 +149,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 |