diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2016-02-06 06:47:31 +0100 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2016-02-06 06:47:31 +0100 |
| commit | a2ef14599689beea106d93eb46ce2dc69c5e7811 (patch) | |
| tree | 0cdee624cbff174dced99c94904c02b58d432c69 /src | |
| parent | 1d3d2724df3ab438bb48eaf5410bb921d63e73b8 (diff) | |
| download | python-decorator-git-a2ef14599689beea106d93eb46ce2dc69c5e7811.tar.gz | |
Made release 4.0.7
Diffstat (limited to 'src')
| -rw-r--r-- | src/decorator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/decorator.py b/src/decorator.py index a0c5ccd..4a02e4e 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -1,6 +1,6 @@ # ######################### LICENSE ############################ # -# Copyright (c) 2005-2015, Michele Simionato +# Copyright (c) 2005-2016, Michele Simionato # All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ import operator import itertools import collections -__version__ = '4.0.6' +__version__ = '4.0.7' if sys.version >= '3': from inspect import getfullargspec @@ -179,6 +179,9 @@ class FunctionMaker(object): if n in ('_func_', '_call_'): raise NameError('%s is overridden in\n%s' % (n, src)) + if not src.endswith('\n'): # add a newline for old Pythons + src += '\n' + # Ensure each generated function has a unique filename for profilers # (such as cProfile) that depend on the tuple of (<filename>, # <definition line>, <function name>) being unique. |
