diff options
author | ?ukasz Langa <lukasz@langa.pl> | 2013-07-02 11:03:31 +0200 |
---|---|---|
committer | ?ukasz Langa <lukasz@langa.pl> | 2013-07-02 11:03:31 +0200 |
commit | 86a2569645566c00e2ef36dff084315c75d573ca (patch) | |
tree | 4dc2068fd8c894e1d73575d00535d61295a5e2f6 /singledispatch_helpers.py | |
parent | 26495c234aa9ff61a5134a696329d22521cb2666 (diff) | |
parent | 2841142ce382e70b664a3e2071427a3e11cdeb44 (diff) | |
download | singledispatch-86a2569645566c00e2ef36dff084315c75d573ca.tar.gz |
Merged with upstream and made compatible with Python 2.6 - 3.33.4.0.2
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 |