summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decorator.py7
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.