What about just casting to a dict in return?
On May 11, 2014 2:34 PM, "Jorge Cañardo Alastuey" <notifications@github.com>
wrote:

> In skbio/core/genetic_code.py:
>
> > +                                                        len(code_sequence)))
> > +
> > +        self.code_sequence = code_sequence
> > +        self.id = id
> > +        self.name = name
> > +        self.start_codon_sequence = start_codon_sequence
> > +        start_codons = {}
> > +        if start_codon_sequence:
> > +            for codon, aa in zip(self._codons, start_codon_sequence):
> > +                if aa != '-':
> > +                    start_codons[codon] = aa
> > +        self.start_codons = start_codons
> > +        codon_lookup = dict(zip(self._codons, code_sequence))
> > +        self.codons = codon_lookup
> > +        # create synonyms for each aa
> > +        aa_lookup = {}
>
> I'm actually OK with that, just that users can change it with no
> assignments and that could be surprising (e.g., executing .synonyms['non
> existent key'] introduces that key.) Maybe set self.synonyms.default_factory
> = None after the loop so that can't happen?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/310/files#r12510873>
> .
>