Hi, I would like this Template :
# %% > __author__ = "" # "Pierre X, Paul Y, Jacques Z" > __copyright__ = "" # "Copyright 2017, The HYRBID Python formation Project" > __credits__ = "" # ["Pierre X", "Paul Y", "Jacques Z", "Albert W"] > __license__ = "" # "GPL" > __version__ = "" # "1.0.1" > __maintainer__ = "" # "Pierre X" > __email__ = "" # "[email protected]" > __status__ = "" # "Production" > # %% > # TODO: N'oubliez pas de le versionner > # FIXME: il faut trouver comment réparer > # XXX: c'est un tag > # HINT: c'est un test > # TIP: encore une balise > # @todo: et la dernière > # %% > > def add(arg_1: int, arg_2: int): > """ > Adds two numbers and returns the result. > This add two real numbers and return a real result. You will want to > use this function in any place you would usually use the ``+`` operator > but requires a functional equivalent. > :param arg_1: The first number to add > :param arg_2: The second number to add > :type arg_1: int > :type arg_2: int > :return: The result of the addition > :rtype: int > :Example: > >>> add(1, 1) > 2 > >>> add(2.1, 3.4) # all int compatible types work > 5.5 > .. seealso:: sub(), div(), mul() > .. warning:: This is a completly useless function. Use it only in a > tutorial unless you want to look like a fool. > .. note:: You may want to use a lambda function instead of this. > Todo: > Delete this function. > """ > return arg_1 + arg_2 > # %% > > if __name__ == "__main__": > import doctest > doctest.testmod() > > But after saving template.py my new file become : # % > __author__ = "" # "Pierre X, Paul Y, Jacques Z" > __copyright__ = "" # "Copyright 2017, The HYRBID Python formation Project" > __credits__ = "" # ["Pierre X", "Paul Y", "Jacques Z", "Albert W"] > __license__ = "" # "GPL" > __version__ = "" # "1.0.1" > __maintainer__ = "" # "Pierre X" > __email__ = "" # "[email protected]" > __status__ = "" # "Production" > # % > # TODO: N'oubliez pas de le versionner > # FIXME: il faut trouver comment réparer > # XXX: c'est un tag > # HINT: c'est un test > # TIP: encore une balise > # @todo: et la dernière > # % > > def add(arg_1: int, arg_2: int): > """ > Adds two numbers and returns the result. > This add two real numbers and return a real result. You will want to > use this function in any place you would usually use the ``+`` operator > but requires a functional equivalent. > :param arg_1: The first number to add > :param arg_2: The second number to add > :type arg_1: int > :type arg_2: int > :return: The result of the addition > :rtype: int > :Example: > >>> add(1, 1) > 2 > >>> add(2.1, 3.4) # all int compatible types work > 5.5 > .. seealso:: sub(), div(), mul() > .. warning:: This is a completly useless function. Use it only in a > tutorial unless you want to look like a fool. > .. note:: You may want to use a lambda function instead of this. > Todo: > Delete this function. > """ > return arg_1 + arg_2 > # % > > if __name__ == "__main__": > import doctest > doctest.testmod() > > "# %%" is cell tag but "# %" isn't a cell tag. What is the solution ? Best, neurobot -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/d/optout.
