"""1Defaults23AUTHORS: William Stein and David Kohel4"""56#*****************************************************************************7# Copyright (C) 2004 William Stein <[email protected]>8#9# Distributed under the terms of the GNU General Public License (GPL)10#11# This code is distributed in the hope that it will be useful,12# but WITHOUT ANY WARRANTY; without even the implied warranty of13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14# General Public License for more details.15#16# The full text of the GPL is available at:17#18# http://www.gnu.org/licenses/19#*****************************************************************************2021# default variable name22var_name = 'x'23242526def variable_names(n, name=None):27if name is None:28name = var_name29n = int(n)30if n == 1:31return [name]32return tuple(['%s%s'%(name,i) for i in range(n)])3334def latex_variable_names(n, name=None):35if name is None:36name = var_name37n = int(n)38if n == 1:39return [name]40v = tuple(['%s_{%s}'%(name,i) for i in range(n)])41return v4243def set_default_variable_name(name, separator=''):44r"""45Change the default variable name and separator.46"""47global var_name, var_sep48var_name = str(name)49var_sep = str(separator)505152