Trees | Indices | Help |
|
---|
|
1 # -*- coding: iso-8859-1 -*- 2 # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) 3 # This file is part of MEDITE. 4 # 5 # MEDITE is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 2 of the License, or 8 # (at your option) any later version. 9 # 10 # MEDITE is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with Foobar; if not, write to the Free Software 17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 1921 """représente un bloc de texte 22 23 Les attributs sont publics, il n'y a pas d'accesseurs ni de mutateurs : attention a ne pas modifier les champs 24 utilisations : bloc(val,posd,posF,index) pour les listes de blocs du texte 25 bloc(val,index) pour les listes A et B (1.(a), 1.(b) ) 26 """ 275329 """Constructeur 30 """ 31 self.val = val #le hash du bloc, ou la lettre si c'est un caractere 32 self.debut = posD #la position de début du bloc dans le texte 33 self.fin = posF #la position de fin du bloc dans le texte +1 (ainsi txt[debut:fin] renvoie le texte du bloc) 34 self.index = index #la position du bloc dans la liste de blocs3537 """Pour l'affichage 38 """ 39 ret ="" 40 if self.index != None: 41 ret += str(self.index) + " > " 42 ret += str(self.val) 43 if self.debut != None : 44 ret += " ["+str(self.debut) 45 if self.fin != None : 46 ret += ":"+str(self.fin) 47 ret += "]" 48 return ret49
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 13 15:25:52 2008 | http://epydoc.sourceforge.net |