This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
More...
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Represent a dictionary of :class:`Separator`
def phystricks.src.Separator.SeparatorList.fusion |
( |
|
self, |
|
|
|
title_list, |
|
|
|
new_title |
|
) |
| |
Remove of the list the separators whose names are in the `title_list`
and add a new separator with the fusion code at the place
where the *first* one was.
INPUT :
- ``title_list`` - a list of `str` that are name of separators
supposed to be part of `self.separator_list`
- ``new_title`` - the title of the new separator that will be
created.
Schematically,
"ONE": "first code"
"TWO": "second code"
"THREE": "third code"
"FOUR": "fourth code"
If one fusion the second and third with the name "NEW", we get
"ONE": "first code"
"NEW" : "second code third code"
"FOUR": "fourth code"
NOTE:
It respect the order. So if the `title_list` comes in the order `["THREE","TWO"]`, it first orders
the list to `["TWO","THREE"]`