def _pkl_filepath(*args, **kwargs):
 py3_suffix = kwargs.get('py3_suffix', '_py3')
 (basename, ext) = splitext(args[(-1)])
 if (sys.version_info[0] >= 3):
  basename += py3_suffix
 new_args = (args[:(-1)] + ((basename + ext),))
 return join(*new_args)

def _pkl_filepath ( * args , ** kwargs ) : py3_suffix = kwargs . get ( 'py3_suffix' , '_py3' ) ( basename , ext ) = splitext ( args [ ( - 1 ) ] ) if ( sys . version_info [ 0 ] >= 3 ) : basename += py3_suffix new_args = ( args [ : ( - 1 ) ] + ( ( basename + ext ) , ) ) return join ( * new_args )
ensure different filenames for python 2 and python 3 pickles an object pickled under python 3 cannot be loaded under python 2 .