[Python-Dev] Polymorphic best practices [was: (Not) delaying the 3.2 release]

Antoine Pitrou solipsis at pitrou.net
Thu Sep 16 17:40:53 CEST 2010


On Thu, 16 Sep 2010 11:30:12 -0400
"R. David Murray" <rdmurray at bitdance.com> wrote:
> 
> And then BaseHeader uses self.lit.colon, etc, when manipulating strings.
> It also has to use slice notation rather than indexing when looking at
> individual characters, which is a PITA but not terrible.
> 
> I'm not saying this is the best approach, since this is all experimental
> code at the moment, but it is *an* approach....

Out of curiousity, can you explain why polymorphism is needed for
e-mail? I would assume that headers are bytes until they are parsed, at
which point they become a pair of unicode strings (one for the header
name and one for its value).

Regards

Antoine.




More information about the Python-Dev mailing list