[Python-Dev] PEP 292: method names

Barry Warsaw barry at python.org
Mon Sep 13 16:44:37 CEST 2004


On Sat, 2004-09-11 at 09:04, Erik Heneryd wrote:

> Come to think of it, I really like the more OO-ish approach better, than 
> to cram everything into a single class.  Is the safe_substitute really 
> that special it deserves a special method?

Yes.

>   Is it really the one, true 
> way to do a "safe" substitution?  

Probably not.

> IIRC DOS and sh don't agree, so it's 
> not that obvious.

I'm sorry I don't follow that one.

> I say keep the inheritance thing, it's much more flexible, and delegate 
> the KeyError condition to an overridable method.

After the lengthy discussions on python-dev, I'm viewing the role of the
Template class a little differently, so I think it's fine to put them
both in one class.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040913/81a339b6/attachment.pgp


More information about the Python-Dev mailing list