Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/diff/5639138f619a/allpy/dna.py
Дата изменения: Unknown
Дата индексирования: Sat Mar 1 10:20:43 2014
Кодировка:
allpy: allpy/dna.py diff

allpy

diff allpy/dna.py @ 379:5639138f619a

Added alignment_type & block_type to both Alignment & Block These are to help in mixins to create new Alignments/Blocks of the same type. Use with care! It is in most cases better to use self.__class__ rather than these attributes. (Or you may lose mixins in the way).
author Daniil Alexeyevsky <dendik@kodomo.fbb.msu.ru>
date Tue, 01 Feb 2011 18:36:26 +0300
parents 24a058450d72
children df571a5233fb
line diff
     1.1 --- a/allpy/dna.py	Tue Feb 01 17:11:33 2011 +0300
     1.2 +++ b/allpy/dna.py	Tue Feb 01 18:36:26 2011 +0300
     1.3 @@ -12,10 +12,14 @@
     1.4  class Sequence(base.Sequence):
     1.5      monomer_type = Monomer
     1.6  
     1.7 -class Alignment(base.Alignment):
     1.8 -    sequence_type = Sequence
     1.9 -
    1.10  class Block(Alignment, base.Block):
    1.11      pass
    1.12  
    1.13 +class Alignment(base.Alignment):
    1.14 +    sequence_type = Sequence
    1.15 +    block_type = Block
    1.16 +    # alignment_type is defined at EOF, since name Alignment undefined yet
    1.17 +
    1.18 +Alignment.alignment_type = Alignment
    1.19 +
    1.20  # vim: set ts=4 sts=4 sw=4 et: